home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / graphics.17 / graphics
Tape Archive  |  1993-03-08  |  920.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: Tape Archive (archive/tar).

You can browse this item here: graphics

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Tape Archive (archive/tar) magic Supported
100% file POSIX tar archive (GNU) default
99% file POSIX tar archive (GNU), directory graphics-0.17/, mode 2755 , uid 37755 , gid 132 , size 0 , seconds 4774574137, user rich default
98% file data default
62% TrID TAR - Tape ARchive (GNU) default
37% TrID TAR - Tape ARchive (directory) default
100% siegfried x-fmt/265 Tape Archive Format default
100% lsar Tar default
100% gt2 TAR Archiv gefunden (Auflistung ist deaktiviert) default
100% disktype GNU tar archive default
100% detectItEasy Archive: tar default
100% binwalkID POSIX tar archive (GNU), owner user name: "-0.17/" default
100% xdgMime application/x-tar default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 67 72 61 70 68 69 63 73 | 2d 30 2e 31 37 2f 00 00 |graphics|-0.17/..|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 20 20 32 37 | 35 35 20 00 20 33 37 37 |.... 27|55 . 377|
|00000070| 35 35 20 00 20 20 20 31 | 33 32 20 00 20 20 20 20 |55 . 1|32 . |
|00000080| 20 20 20 20 20 20 30 20 | 20 34 37 37 34 35 37 34 | 0 | 4774574|
|00000090| 31 33 37 20 20 31 30 34 | 36 32 00 20 35 00 00 00 |137 104|62. 5...|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 75 73 74 61 72 20 20 | 00 72 69 63 68 00 00 00 |.ustar |.rich...|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 67 72 61 70 68 69 63 73 | 2d 30 2e 31 37 2f 70 6c |graphics|-0.17/pl|
|00000210| 6f 74 32 66 69 67 2f 00 | 00 00 00 00 00 00 00 00 |ot2fig/.|........|
|00000220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000260| 00 00 00 00 20 20 20 37 | 35 35 20 00 20 33 37 37 |.... 7|55 . 377|
|00000270| 35 35 20 00 20 20 20 31 | 33 32 20 00 20 20 20 20 |55 . 1|32 . |
|00000280| 20 20 20 20 20 20 30 20 | 20 34 37 37 32 30 34 32 | 0 | 4772042|
|00000290| 31 32 34 20 20 31 32 31 | 34 36 00 20 35 00 00 00 |124 121|46. 5...|
|000002a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000300| 00 75 73 74 61 72 20 20 | 00 72 69 63 68 00 00 00 |.ustar |.rich...|
|00000310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 67 72 61 70 68 69 63 73 | 2d 30 2e 31 37 2f 70 6c |graphics|-0.17/pl|
|00000410| 6f 74 32 66 69 67 2f 70 | 6c 6f 74 2e 63 00 00 00 |ot2fig/p|lot.c...|
|00000420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000460| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 33 37 37 |.... 6|44 . 377|
|00000470| 35 35 20 00 20 20 20 31 | 33 32 20 00 20 20 20 20 |55 . 1|32 . |
|00000480| 20 20 33 30 33 31 35 20 | 20 34 37 37 32 30 34 32 | 30315 | 4772042|
|00000490| 30 36 36 20 20 31 33 33 | 37 37 00 20 30 00 00 00 |066 133|77. 0...|
|000004a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000500| 00 75 73 74 61 72 20 20 | 00 72 69 63 68 00 00 00 |.ustar |.rich...|
|00000510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000520| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000600| 2f 2a 20 54 68 69 73 20 | 70 72 6f 67 72 61 6d 2c |/* This |program,|
|00000610| 20 70 6c 6f 74 2c 20 74 | 72 61 6e 73 6c 61 74 65 | plot, t|ranslate|
|00000620| 73 20 61 20 47 4e 55 20 | 70 6c 6f 74 20 66 69 6c |s a GNU |plot fil|
|00000630| 65 20 69 6e 74 6f 20 64 | 65 76 69 63 65 20 73 70 |e into d|evice sp|
|00000640| 65 63 69 66 69 63 20 6f | 75 74 70 75 74 2e 0a 20 |ecific o|utput.. |
|00000650| 20 20 43 6f 70 79 72 69 | 67 68 74 20 28 43 29 20 | Copyri|ght (C) |
|00000660| 31 39 38 39 20 46 72 65 | 65 20 53 6f 66 74 77 61 |1989 Fre|e Softwa|
|00000670| 72 65 20 46 6f 75 6e 64 | 61 74 69 6f 6e 2c 20 49 |re Found|ation, I|
|00000680| 6e 63 2e 0a 0a 50 6c 6f | 74 20 69 73 20 64 69 73 |nc...Plo|t is dis|
|00000690| 74 72 69 62 75 74 65 64 | 20 69 6e 20 74 68 65 20 |tributed| in the |
|000006a0| 68 6f 70 65 20 74 68 61 | 74 20 69 74 20 77 69 6c |hope tha|t it wil|
|000006b0| 6c 20 62 65 20 75 73 65 | 66 75 6c 2c 20 62 75 74 |l be use|ful, but|
|000006c0| 20 57 49 54 48 4f 55 54 | 0a 41 4e 59 20 57 41 52 | WITHOUT|.ANY WAR|
|000006d0| 52 41 4e 54 59 2e 20 20 | 4e 6f 20 61 75 74 68 6f |RANTY. |No autho|
|000006e0| 72 20 6f 72 20 64 69 73 | 74 72 69 62 75 74 6f 72 |r or dis|tributor|
|000006f0| 20 61 63 63 65 70 74 73 | 20 72 65 73 70 6f 6e 73 | accepts| respons|
|00000700| 69 62 69 6c 69 74 79 20 | 74 6f 0a 61 6e 79 6f 6e |ibility |to.anyon|
|00000710| 65 20 66 6f 72 20 74 68 | 65 20 63 6f 6e 73 65 71 |e for th|e conseq|
|00000720| 75 65 6e 63 65 73 20 6f | 66 20 75 73 69 6e 67 20 |uences o|f using |
|00000730| 69 74 20 6f 72 20 66 6f | 72 20 77 68 65 74 68 65 |it or fo|r whethe|
|00000740| 72 20 69 74 20 73 65 72 | 76 65 73 20 61 6e 79 0a |r it ser|ves any.|
|00000750| 70 61 72 74 69 63 75 6c | 61 72 20 70 75 72 70 6f |particul|ar purpo|
|00000760| 73 65 20 6f 72 20 77 6f | 72 6b 73 20 61 74 20 61 |se or wo|rks at a|
|00000770| 6c 6c 2c 20 75 6e 6c 65 | 73 73 20 68 65 20 73 61 |ll, unle|ss he sa|
|00000780| 79 73 20 73 6f 20 69 6e | 20 77 72 69 74 69 6e 67 |ys so in| writing|
|00000790| 2e 0a 52 65 66 65 72 20 | 74 6f 20 74 68 65 20 47 |..Refer |to the G|
|000007a0| 4e 55 20 47 65 6e 65 72 | 61 6c 20 50 75 62 6c 69 |NU Gener|al Publi|
|000007b0| 63 20 4c 69 63 65 6e 73 | 65 20 66 6f 72 20 66 75 |c Licens|e for fu|
|000007c0| 6c 6c 20 64 65 74 61 69 | 6c 73 2e 0a 0a 45 76 65 |ll detai|ls...Eve|
|000007d0| 72 79 6f 6e 65 20 69 73 | 20 67 72 61 6e 74 65 64 |ryone is| granted|
|000007e0| 20 70 65 72 6d 69 73 73 | 69 6f 6e 20 74 6f 20 63 | permiss|ion to c|
|000007f0| 6f 70 79 2c 20 6d 6f 64 | 69 66 79 20 61 6e 64 20 |opy, mod|ify and |
|00000800| 72 65 64 69 73 74 72 69 | 62 75 74 65 20 70 6c 6f |redistri|bute plo|
|00000810| 74 2c 0a 62 75 74 20 6f | 6e 6c 79 20 75 6e 64 65 |t,.but o|nly unde|
|00000820| 72 20 74 68 65 20 63 6f | 6e 64 69 74 69 6f 6e 73 |r the co|nditions|
|00000830| 20 64 65 73 63 72 69 62 | 65 64 20 69 6e 20 74 68 | describ|ed in th|
|00000840| 65 20 47 4e 55 20 47 65 | 6e 65 72 61 6c 20 50 75 |e GNU Ge|neral Pu|
|00000850| 62 6c 69 63 0a 4c 69 63 | 65 6e 73 65 2e 20 20 41 |blic.Lic|ense. A|
|00000860| 20 63 6f 70 79 20 6f 66 | 20 74 68 69 73 20 6c 69 | copy of| this li|
|00000870| 63 65 6e 73 65 20 69 73 | 20 73 75 70 70 6f 73 65 |cense is| suppose|
|00000880| 64 20 74 6f 20 68 61 76 | 65 20 62 65 65 6e 20 67 |d to hav|e been g|
|00000890| 69 76 65 6e 20 74 6f 20 | 79 6f 75 0a 61 6c 6f 6e |iven to |you.alon|
|000008a0| 67 20 77 69 74 68 20 70 | 6c 6f 74 20 73 6f 20 79 |g with p|lot so y|
|000008b0| 6f 75 20 63 61 6e 20 6b | 6e 6f 77 20 79 6f 75 72 |ou can k|now your|
|000008c0| 20 72 69 67 68 74 73 20 | 61 6e 64 20 72 65 73 70 | rights |and resp|
|000008d0| 6f 6e 73 69 62 69 6c 69 | 74 69 65 73 2e 20 20 49 |onsibili|ties. I|
|000008e0| 74 0a 73 68 6f 75 6c 64 | 20 62 65 20 69 6e 20 61 |t.should| be in a|
|000008f0| 20 66 69 6c 65 20 6e 61 | 6d 65 64 20 43 4f 50 59 | file na|med COPY|
|00000900| 49 4e 47 2e 20 20 41 6d | 6f 6e 67 20 6f 74 68 65 |ING. Am|ong othe|
|00000910| 72 20 74 68 69 6e 67 73 | 2c 20 74 68 65 20 63 6f |r things|, the co|
|00000920| 70 79 72 69 67 68 74 0a | 6e 6f 74 69 63 65 20 61 |pyright.|notice a|
|00000930| 6e 64 20 74 68 69 73 20 | 6e 6f 74 69 63 65 20 6d |nd this |notice m|
|00000940| 75 73 74 20 62 65 20 70 | 72 65 73 65 72 76 65 64 |ust be p|reserved|
|00000950| 20 6f 6e 20 61 6c 6c 20 | 63 6f 70 69 65 73 2e 20 | on all |copies. |
|00000960| 20 2a 2f 0a 0a 2f 2a 20 | 54 68 69 73 20 66 69 6c | */../* |This fil|
|00000970| 65 20 69 73 20 74 68 65 | 20 6d 61 69 6e 20 72 6f |e is the| main ro|
|00000980| 75 74 69 6e 65 20 66 6f | 72 20 70 6c 6f 74 2e 0a |utine fo|r plot..|
|00000990| 0a 20 20 20 49 74 20 69 | 6e 63 6c 75 64 65 73 20 |. It i|ncludes |
|000009a0| 63 6f 64 65 20 74 6f 20 | 72 65 61 64 20 74 68 65 |code to |read the|
|000009b0| 20 70 6c 6f 74 20 66 69 | 6c 65 20 61 6e 64 20 63 | plot fi|le and c|
|000009c0| 61 6c 6c 20 70 6c 6f 74 | 20 66 75 6e 63 74 69 6f |all plot| functio|
|000009d0| 6e 73 0a 20 20 20 74 6f | 20 64 72 61 77 20 74 68 |ns. to| draw th|
|000009e0| 65 20 67 72 61 70 68 69 | 63 73 2e 20 2a 2f 0a 0a |e graphi|cs. */..|
|000009f0| 23 69 6e 63 6c 75 64 65 | 20 22 73 79 73 2d 64 65 |#include| "sys-de|
|00000a00| 66 69 6e 65 73 2e 68 22 | 0a 23 69 6e 63 6c 75 64 |fines.h"|.#includ|
|00000a10| 65 20 22 6c 69 62 70 6c | 6f 74 2e 68 22 0a 23 69 |e "libpl|ot.h".#i|
|00000a20| 6e 63 6c 75 64 65 20 22 | 67 65 74 6f 70 74 2e 68 |nclude "|getopt.h|
|00000a30| 22 0a 23 69 6e 63 6c 75 | 64 65 20 22 2e 2e 2f 43 |".#inclu|de "../C|
|00000a40| 4f 50 59 49 4e 47 22 0a | 0a 65 6e 75 6d 20 70 6c |OPYING".|.enum pl|
|00000a50| 6f 74 5f 69 6e 73 74 72 | 75 63 74 69 6f 6e 0a 7b |ot_instr|uction.{|
|00000a60| 0a 20 20 41 4c 41 42 45 | 4c 20 3d 09 27 54 27 2c |. ALABE|L =.'T',|
|00000a70| 0a 20 20 41 52 43 20 3d | 09 09 27 61 27 2c 0a 20 |. ARC =|..'a',. |
|00000a80| 20 43 49 52 43 4c 45 20 | 3d 09 27 63 27 2c 0a 20 | CIRCLE |=.'c',. |
|00000a90| 20 43 4f 4c 4f 52 20 3d | 09 27 43 27 2c 0a 20 20 | COLOR =|.'C',. |
|00000aa0| 43 4f 4e 54 20 3d 09 27 | 6e 27 2c 0a 20 20 45 52 |CONT =.'|n',. ER|
|00000ab0| 41 53 45 20 3d 09 27 65 | 27 2c 0a 20 20 46 49 4c |ASE =.'e|',. FIL|
|00000ac0| 4c 20 3d 09 27 4c 27 2c | 0a 20 20 46 4f 4e 54 20 |L =.'L',|. FONT |
|00000ad0| 3d 09 27 46 27 2c 0a 20 | 20 46 4f 4e 54 53 49 5a |=.'F',. | FONTSIZ|
|00000ae0| 45 20 3d 09 27 53 27 2c | 0a 20 20 4c 41 42 45 4c |E =.'S',|. LABEL|
|00000af0| 20 3d 09 27 74 27 2c 0a | 20 20 4c 49 4e 45 20 3d | =.'t',.| LINE =|
|00000b00| 09 27 6c 27 2c 0a 20 20 | 4c 49 4e 45 4d 4f 44 20 |.'l',. |LINEMOD |
|00000b10| 3d 09 27 66 27 2c 0a 20 | 20 4d 4f 56 45 20 3d 09 |=.'f',. | MOVE =.|
|00000b20| 27 6d 27 2c 0a 20 20 50 | 4f 49 4e 54 20 3d 09 27 |'m',. P|OINT =.'|
|00000b30| 70 27 2c 0a 20 20 52 4f | 54 41 54 45 20 3d 09 27 |p',. RO|TATE =.'|
|00000b40| 72 27 2c 0a 20 20 53 50 | 41 43 45 20 3d 09 27 73 |r',. SP|ACE =.'s|
|00000b50| 27 2c 0a 7d 3b 0a 0c 0a | 2f 2a 20 54 68 69 73 20 |',.};...|/* This |
|00000b60| 66 6c 61 67 20 73 70 65 | 63 69 66 69 65 73 20 74 |flag spe|cifies t|
|00000b70| 68 61 74 20 74 68 65 20 | 69 6e 70 75 74 20 63 6f |hat the |input co|
|00000b80| 6e 74 61 69 6e 73 20 75 | 6e 73 69 67 6e 65 64 20 |ntains u|nsigned |
|00000b90| 28 69 66 20 7a 65 72 6f | 29 20 6f 72 0a 20 20 20 |(if zero|) or. |
|00000ba0| 73 69 67 6e 65 64 20 28 | 69 66 20 6e 6f 6e 7a 65 |signed (|if nonze|
|00000bb0| 72 6f 29 20 74 77 6f 20 | 62 79 74 65 20 69 6e 74 |ro) two |byte int|
|00000bc0| 67 65 72 73 2e 20 54 68 | 65 20 64 65 66 61 75 6c |gers. Th|e defaul|
|00000bd0| 74 20 69 73 20 73 69 67 | 6e 65 64 2e 20 2a 2f 0a |t is sig|ned. */.|
|00000be0| 69 6e 74 20 73 69 67 6e | 65 64 5f 69 6e 70 75 74 |int sign|ed_input|
|00000bf0| 20 3d 20 31 3b 0a 0a 2f | 2a 20 72 65 61 64 20 69 | = 1;../|* read i|
|00000c00| 6e 20 74 77 6f 20 62 79 | 74 65 20 69 6e 74 67 65 |n two by|te intge|
|00000c10| 72 73 20 77 69 74 68 20 | 68 69 67 68 5f 62 79 74 |rs with |high_byt|
|00000c20| 65 5f 66 69 72 73 74 2e | 20 54 68 65 20 64 65 66 |e_first.| The def|
|00000c30| 61 75 6c 74 20 69 73 20 | 74 6f 20 72 65 61 64 20 |ault is |to read |
|00000c40| 74 68 65 20 6c 6f 77 0a | 20 20 20 62 79 74 65 20 |the low.| byte |
|00000c50| 66 69 72 73 74 2e 20 2a | 2f 0a 69 6e 74 20 68 69 |first. *|/.int hi|
|00000c60| 67 68 5f 62 79 74 65 5f | 66 69 72 73 74 20 3d 20 |gh_byte_|first = |
|00000c70| 30 3b 0a 0a 2f 2a 20 67 | 75 65 73 73 5f 62 79 74 |0;../* g|uess_byt|
|00000c80| 65 5f 6f 72 64 65 72 20 | 69 73 20 61 20 66 6c 61 |e_order |is a fla|
|00000c90| 67 20 77 68 69 63 68 2c | 20 69 66 20 6e 6f 6e 2d |g which,| if non-|
|00000ca0| 7a 65 72 6f 2c 20 69 6e | 64 69 63 61 74 65 64 20 |zero, in|dicated |
|00000cb0| 74 68 61 74 20 74 68 65 | 20 66 75 6e 63 74 69 6f |that the| functio|
|00000cc0| 6e 0a 20 20 20 66 69 6e | 64 5f 62 79 74 65 5f 6f |n. fin|d_byte_o|
|00000cd0| 72 64 65 72 20 73 68 6f | 75 6c 64 20 62 65 20 75 |rder sho|uld be u|
|00000ce0| 73 65 64 20 74 6f 20 67 | 75 65 73 73 20 74 68 65 |sed to g|uess the|
|00000cf0| 20 62 79 74 65 20 6f 72 | 64 65 72 20 66 6f 72 20 | byte or|der for |
|00000d00| 74 68 65 20 69 6e 70 75 | 74 20 66 69 6c 65 2e 20 |the inpu|t file. |
|00000d10| 2a 2f 0a 69 6e 74 20 67 | 75 65 73 73 5f 62 79 74 |*/.int g|uess_byt|
|00000d20| 65 5f 6f 72 64 65 72 20 | 3d 20 31 3b 0a 0a 2f 2a |e_order |= 1;../*|
|00000d30| 20 73 77 61 70 5f 62 79 | 74 65 73 20 72 65 74 75 | swap_by|tes retu|
|00000d40| 72 6e 73 20 74 68 65 20 | 62 6f 74 74 6f 6d 20 74 |rns the |bottom t|
|00000d50| 77 6f 20 62 79 74 65 73 | 20 6f 66 20 69 74 73 20 |wo bytes| of its |
|00000d60| 69 6e 74 65 67 65 72 20 | 61 72 67 75 6d 65 6e 74 |integer |argument|
|00000d70| 20 77 69 74 68 0a 20 20 | 20 74 68 65 69 72 20 62 | with. | their b|
|00000d80| 79 74 65 73 20 72 65 76 | 65 72 73 65 64 2e 20 2a |ytes rev|ersed. *|
|00000d90| 2f 0a 0a 69 6e 74 0a 73 | 77 61 70 5f 62 79 74 65 |/..int.s|wap_byte|
|00000da0| 73 20 28 78 29 0a 20 20 | 20 20 20 69 6e 74 20 78 |s (x). | int x|
|00000db0| 3b 0a 7b 0a 20 20 75 6e | 73 69 67 6e 65 64 20 63 |;.{. un|signed c|
|00000dc0| 68 61 72 20 61 2c 20 62 | 3b 0a 20 20 61 20 3d 20 |har a, b|;. a = |
|00000dd0| 78 20 26 20 30 78 66 66 | 3b 0a 20 20 62 20 3d 20 |x & 0xff|;. b = |
|00000de0| 28 78 20 3e 3e 20 38 29 | 20 26 20 30 78 66 66 3b |(x >> 8)| & 0xff;|
|00000df0| 0a 20 20 72 65 74 75 72 | 6e 20 28 28 61 20 3c 3c |. retur|n ((a <<|
|00000e00| 20 38 29 7c 62 29 3b 0a | 7d 0a 0a 2f 2a 20 54 68 | 8)|b);.|}../* Th|
|00000e10| 69 73 20 69 73 20 61 20 | 73 65 74 20 6f 66 20 6b |is is a |set of k|
|00000e20| 6e 6f 77 6e 20 76 61 6c | 75 65 73 20 66 6f 72 20 |nown val|ues for |
|00000e30| 74 68 65 20 6d 61 78 69 | 6d 75 6d 20 78 20 28 61 |the maxi|mum x (a|
|00000e40| 62 73 63 69 73 73 61 29 | 20 76 61 6c 75 65 73 0a |bscissa)| values.|
|00000e50| 20 20 20 73 70 65 63 69 | 66 69 65 64 20 69 6e 20 | speci|fied in |
|00000e60| 74 68 65 20 70 6c 6f 74 | 20 73 69 7a 65 20 63 6f |the plot| size co|
|00000e70| 6d 6d 61 6e 64 20 66 6f | 72 20 6b 6e 6f 77 6e 20 |mmand fo|r known |
|00000e80| 64 65 76 69 63 65 73 2e | 20 20 55 73 69 6e 67 20 |devices.| Using |
|00000e90| 74 68 69 73 0a 20 20 20 | 73 65 74 20 77 65 20 63 |this. |set we c|
|00000ea0| 61 6e 20 63 6f 6e 73 74 | 72 75 63 74 20 61 20 68 |an const|ruct a h|
|00000eb0| 65 75 72 69 73 74 69 63 | 20 70 72 6f 63 65 65 64 |euristic| proceed|
|00000ec0| 75 72 65 20 66 6f 72 20 | 72 65 63 6f 67 6e 69 7a |ure for |recogniz|
|00000ed0| 69 6e 67 20 70 6c 6f 74 | 0a 20 20 20 66 69 6c 65 |ing plot|. file|
|00000ee0| 73 20 69 6e 20 77 68 69 | 63 68 20 74 68 65 20 62 |s in whi|ch the b|
|00000ef0| 79 74 65 73 20 6f 66 20 | 74 77 6f 20 62 79 74 65 |ytes of |two byte|
|00000f00| 20 69 6e 74 65 67 65 72 | 73 20 61 72 65 20 72 65 | integer|s are re|
|00000f10| 76 65 72 73 65 64 2e 20 | 20 57 65 20 63 61 6e 0a |versed. | We can.|
|00000f20| 20 20 20 72 65 63 6f 67 | 6e 69 7a 65 20 74 68 65 | recog|nize the|
|00000f30| 73 65 20 66 69 6c 65 73 | 20 62 79 20 6c 6f 6f 6b |se files| by look|
|00000f40| 69 6e 67 20 66 6f 72 20 | 73 69 7a 65 20 63 6f 6d |ing for |size com|
|00000f50| 6d 61 6e 64 73 20 63 6f | 6e 74 61 69 6e 69 6e 67 |mands co|ntaining|
|00000f60| 20 74 68 65 73 65 0a 20 | 20 20 6b 6e 6f 77 6e 20 | these. | known |
|00000f70| 73 69 7a 65 73 20 69 6e | 20 62 79 74 65 20 72 65 |sizes in| byte re|
|00000f80| 76 65 72 73 65 64 20 66 | 6f 72 6d 2e 20 54 68 65 |versed f|orm. The|
|00000f90| 20 6c 61 73 74 20 65 6e | 74 72 79 20 73 68 6f 75 | last en|try shou|
|00000fa0| 6c 64 20 62 65 20 30 2e | 20 2a 2f 0a 20 20 20 0a |ld be 0.| */. .|
|00000fb0| 69 6e 74 20 6b 6e 6f 77 | 6e 5f 73 69 7a 65 5b 33 |int know|n_size[3|
|00000fc0| 32 5d 20 3d 20 7b 0a 20 | 20 35 30 34 2c 09 09 09 |2] = {. | 504,...|
|00000fd0| 09 2f 2a 20 70 6c 6f 74 | 33 64 20 6f 75 74 70 75 |./* plot|3d outpu|
|00000fe0| 74 20 35 30 34 78 35 30 | 34 20 2a 2f 0a 20 20 32 |t 504x50|4 */. 2|
|00000ff0| 30 34 38 2c 09 09 09 09 | 2f 2a 20 76 65 72 73 61 |048,....|/* versa|
|00001000| 74 65 6b 20 70 6c 6f 74 | 74 65 72 20 32 30 34 38 |tek plot|ter 2048|
|00001010| 78 32 30 34 38 20 2a 2f | 0a 20 20 32 31 30 30 2c |x2048 */|. 2100,|
|00001020| 09 09 09 09 2f 2a 20 70 | 6c 6f 74 33 64 20 6f 75 |..../* p|lot3d ou|
|00001030| 74 70 75 74 20 2a 2f 0a | 20 20 33 31 32 30 2c 09 |tput */.| 3120,.|
|00001040| 09 09 09 2f 2a 20 54 65 | 6b 74 72 6f 6e 69 78 20 |.../* Te|ktronix |
|00001050| 34 30 31 30 20 74 65 72 | 6d 69 6e 61 6c 20 33 31 |4010 ter|minal 31|
|00001060| 32 30 78 33 31 32 30 20 | 2a 2f 0a 20 20 34 30 39 |20x3120 |*/. 409|
|00001070| 36 2c 09 09 09 09 2f 2a | 20 47 53 49 20 33 30 30 |6,..../*| GSI 300|
|00001080| 20 74 65 72 6d 69 6e 61 | 6c 20 34 30 39 36 78 34 | termina|l 4096x4|
|00001090| 30 39 36 20 2a 2f 0a 20 | 20 30 09 09 09 09 2f 2a |096 */. | 0..../*|
|000010a0| 20 74 68 65 20 6c 61 73 | 74 20 65 6e 74 72 79 20 | the las|t entry |
|000010b0| 73 68 6f 75 6c 64 20 62 | 65 20 30 20 2a 2f 0a 20 |should b|e 0 */. |
|000010c0| 20 7d 3b 0a 0a 2f 2a 20 | 66 69 6e 64 5f 62 79 74 | };../* |find_byt|
|000010d0| 65 5f 6f 72 64 65 72 20 | 74 61 6b 65 73 20 66 6f |e_order |takes fo|
|000010e0| 75 72 20 69 6e 74 65 67 | 65 72 20 61 72 67 75 6d |ur integ|er argum|
|000010f0| 65 6e 74 73 20 61 6e 64 | 20 6d 61 74 63 68 65 73 |ents and| matches|
|00001100| 20 74 68 69 72 64 20 6f | 6e 65 0a 20 20 20 61 67 | third o|ne. ag|
|00001110| 61 69 6e 73 74 20 61 20 | 73 65 74 20 6f 66 20 6b |ainst a |set of k|
|00001120| 6e 6f 77 6e 20 76 61 6c | 75 65 73 20 28 73 69 7a |nown val|ues (siz|
|00001130| 65 73 2c 20 73 65 65 20 | 61 62 6f 76 65 29 2e 20 |es, see |above). |
|00001140| 49 66 20 74 68 65 72 65 | 20 69 73 20 61 20 6d 61 |If there| is a ma|
|00001150| 74 63 68 0a 20 20 20 69 | 74 20 6d 65 72 65 6c 79 |tch. i|t merely|
|00001160| 20 72 65 74 75 72 6e 73 | 2e 20 20 49 66 20 74 68 | returns|. If th|
|00001170| 65 72 65 20 69 73 20 6e | 6f 20 6d 61 74 63 68 2c |ere is n|o match,|
|00001180| 20 69 74 20 63 68 65 63 | 6b 20 65 61 63 68 20 6f | it chec|k each o|
|00001190| 66 20 74 68 65 20 76 61 | 6c 75 65 73 0a 20 20 20 |f the va|lues. |
|000011a0| 61 67 61 69 6e 20 77 69 | 74 68 20 74 68 65 20 62 |again wi|th the b|
|000011b0| 6f 74 74 6f 6d 20 74 77 | 6f 20 62 79 74 65 73 20 |ottom tw|o bytes |
|000011c0| 72 65 76 65 72 73 65 64 | 2e 20 49 66 20 73 75 63 |reversed|. If suc|
|000011d0| 68 20 61 20 6d 61 74 63 | 68 20 69 73 20 66 6f 75 |h a matc|h is fou|
|000011e0| 6e 64 2c 20 74 68 65 0a | 20 20 20 62 6f 74 74 6f |nd, the.| botto|
|000011f0| 6d 20 74 77 6f 20 62 79 | 74 65 73 20 6f 66 20 65 |m two by|tes of e|
|00001200| 61 63 68 20 61 72 67 75 | 6d 65 6e 74 20 69 73 20 |ach argu|ment is |
|00001210| 72 65 76 65 72 73 65 64 | 2c 20 74 68 65 20 68 69 |reversed|, the hi|
|00001220| 67 68 5f 62 79 74 65 5f | 66 69 72 73 74 20 66 6c |gh_byte_|first fl|
|00001230| 61 67 0a 20 20 20 69 73 | 20 69 6e 76 65 72 74 65 |ag. is| inverte|
|00001240| 64 20 74 6f 20 69 6e 64 | 69 63 61 74 65 64 20 68 |d to ind|icated h|
|00001250| 6f 77 20 74 77 6f 20 62 | 79 74 65 20 69 6e 74 65 |ow two b|yte inte|
|00001260| 67 65 72 73 20 73 68 6f | 75 6c 64 20 62 65 20 72 |gers sho|uld be r|
|00001270| 65 61 64 20 61 6e 64 20 | 74 68 65 0a 20 20 20 72 |ead and |the. r|
|00001280| 75 6e 63 74 69 6f 6e 20 | 72 65 74 75 72 6e 73 2e |unction |returns.|
|00001290| 20 2a 2f 0a 20 20 20 0a | 76 6f 69 64 0a 66 69 6e | */. .|void.fin|
|000012a0| 64 5f 62 79 74 65 5f 6f | 72 64 65 72 20 28 78 30 |d_byte_o|rder (x0|
|000012b0| 2c 20 79 30 2c 20 78 31 | 2c 20 79 31 29 0a 20 20 |, y0, x1|, y1). |
|000012c0| 20 20 20 69 6e 74 20 2a | 78 30 2c 20 2a 79 30 2c | int *|x0, *y0,|
|000012d0| 20 2a 78 31 2c 20 2a 79 | 31 3b 0a 7b 0a 20 20 69 | *x1, *y|1;.{. i|
|000012e0| 6e 74 20 69 3b 0a 20 20 | 66 6f 72 20 28 69 3d 30 |nt i;. |for (i=0|
|000012f0| 3b 20 6b 6e 6f 77 6e 5f | 73 69 7a 65 5b 69 5d 21 |; known_|size[i]!|
|00001300| 3d 30 3b 20 69 2b 2b 29 | 0a 20 20 20 20 7b 0a 20 |=0; i++)|. {. |
|00001310| 20 20 20 20 20 69 66 20 | 28 2a 78 31 20 3d 3d 20 | if |(*x1 == |
|00001320| 6b 6e 6f 77 6e 5f 73 69 | 7a 65 5b 69 5d 29 0a 09 |known_si|ze[i])..|
|00001330| 72 65 74 75 72 6e 3b 0a | 20 20 20 20 7d 0a 20 20 |return;.| }. |
|00001340| 2f 2a 20 6e 6f 77 20 63 | 68 65 63 6b 20 74 6f 20 |/* now c|heck to |
|00001350| 73 65 65 20 69 66 20 72 | 65 76 65 72 73 69 6e 67 |see if r|eversing|
|00001360| 20 74 68 65 20 62 79 74 | 65 73 20 61 6c 6c 6f 77 | the byt|es allow|
|00001370| 73 20 61 20 6d 61 74 63 | 68 2e 2e 2e 20 2a 2f 0a |s a matc|h... */.|
|00001380| 20 20 66 6f 72 20 28 69 | 3d 30 3b 20 6b 6e 6f 77 | for (i|=0; know|
|00001390| 6e 5f 73 69 7a 65 5b 69 | 5d 21 3d 30 3b 20 69 2b |n_size[i|]!=0; i+|
|000013a0| 2b 29 0a 20 20 20 20 7b | 0a 20 20 20 20 20 20 69 |+). {|. i|
|000013b0| 66 20 28 2a 78 31 20 3d | 3d 20 73 77 61 70 5f 62 |f (*x1 =|= swap_b|
|000013c0| 79 74 65 73 20 28 6b 6e | 6f 77 6e 5f 73 69 7a 65 |ytes (kn|own_size|
|000013d0| 5b 69 5d 29 29 0a 09 7b | 0a 09 20 20 2a 78 30 20 |[i]))..{|.. *x0 |
|000013e0| 3d 20 73 77 61 70 5f 62 | 79 74 65 73 20 28 2a 78 |= swap_b|ytes (*x|
|000013f0| 30 29 3b 0a 09 20 20 2a | 79 30 20 3d 20 73 77 61 |0);.. *|y0 = swa|
|00001400| 70 5f 62 79 74 65 73 20 | 28 2a 79 30 29 3b 0a 09 |p_bytes |(*y0);..|
|00001410| 20 20 2a 78 31 20 3d 20 | 73 77 61 70 5f 62 79 74 | *x1 = |swap_byt|
|00001420| 65 73 20 28 2a 78 31 29 | 3b 0a 09 20 20 2a 79 31 |es (*x1)|;.. *y1|
|00001430| 20 3d 20 73 77 61 70 5f | 62 79 74 65 73 20 28 2a | = swap_|bytes (*|
|00001440| 79 31 29 3b 0a 09 20 20 | 68 69 67 68 5f 62 79 74 |y1);.. |high_byt|
|00001450| 65 5f 66 69 72 73 74 20 | 3d 20 21 20 68 69 67 68 |e_first |= ! high|
|00001460| 5f 62 79 74 65 5f 66 69 | 72 73 74 3b 0a 09 20 20 |_byte_fi|rst;.. |
|00001470| 72 65 74 75 72 6e 3b 0a | 09 7d 0a 20 20 20 20 7d |return;.|.}. }|
|00001480| 0a 0a 20 20 2f 2a 20 66 | 69 6e 61 6c 6c 79 2c 20 |.. /* f|inally, |
|00001490| 69 66 20 6e 6f 6e 65 20 | 6f 66 20 74 68 69 73 20 |if none |of this |
|000014a0| 77 6f 72 6b 73 2c 20 6a | 75 73 74 20 61 73 73 75 |works, j|ust assu|
|000014b0| 6d 65 20 74 68 61 74 20 | 78 31 20 3e 20 31 32 38 |me that |x1 > 128|
|000014c0| 2e 20 2a 2f 0a 20 20 69 | 66 20 28 28 2a 78 31 20 |. */. i|f ((*x1 |
|000014d0| 3c 20 31 32 38 29 20 26 | 26 20 28 73 77 61 70 5f |< 128) &|& (swap_|
|000014e0| 62 79 74 65 73 20 28 2a | 78 31 29 20 3e 20 31 32 |bytes (*|x1) > 12|
|000014f0| 38 29 29 0a 20 20 20 20 | 7b 0a 20 20 20 20 20 20 |8)). |{. |
|00001500| 2a 78 30 20 3d 20 73 77 | 61 70 5f 62 79 74 65 73 |*x0 = sw|ap_bytes|
|00001510| 20 28 2a 78 30 29 3b 0a | 20 20 20 20 20 20 2a 79 | (*x0);.| *y|
|00001520| 30 20 3d 20 73 77 61 70 | 5f 62 79 74 65 73 20 28 |0 = swap|_bytes (|
|00001530| 2a 79 30 29 3b 0a 20 20 | 20 20 20 20 2a 78 31 20 |*y0);. | *x1 |
|00001540| 3d 20 73 77 61 70 5f 62 | 79 74 65 73 20 28 2a 78 |= swap_b|ytes (*x|
|00001550| 31 29 3b 0a 20 20 20 20 | 20 20 2a 79 31 20 3d 20 |1);. | *y1 = |
|00001560| 73 77 61 70 5f 62 79 74 | 65 73 20 28 2a 79 31 29 |swap_byt|es (*y1)|
|00001570| 3b 0a 20 20 20 20 20 20 | 68 69 67 68 5f 62 79 74 |;. |high_byt|
|00001580| 65 5f 66 69 72 73 74 20 | 3d 20 21 20 68 69 67 68 |e_first |= ! high|
|00001590| 5f 62 79 74 65 5f 66 69 | 72 73 74 3b 0a 20 20 20 |_byte_fi|rst;. |
|000015a0| 20 20 20 72 65 74 75 72 | 6e 3b 0a 20 20 20 20 7d | retur|n;. }|
|000015b0| 0a 7d 0a 0c 0a 2f 2a 20 | 52 65 61 64 20 61 20 62 |.}.../* |Read a b|
|000015c0| 79 74 65 20 2a 2f 0a 0a | 23 64 65 66 69 6e 65 20 |yte */..|#define |
|000015d0| 72 65 61 64 5f 62 79 74 | 65 28 73 74 72 65 61 6d |read_byt|e(stream|
|000015e0| 29 20 28 67 65 74 63 20 | 28 73 74 72 65 61 6d 29 |) (getc |(stream)|
|000015f0| 29 0a 0a 2f 2a 20 52 65 | 61 64 20 61 20 63 6f 6f |)../* Re|ad a coo|
|00001600| 72 64 69 6e 61 74 65 20 | 2d 20 61 20 74 77 6f 20 |rdinate |- a two |
|00001610| 62 79 74 65 20 69 6e 74 | 65 67 65 72 2e 20 2a 2f |byte int|eger. */|
|00001620| 0a 20 20 0a 69 6e 74 20 | 63 6f 6f 72 64 20 28 69 |. .int |coord (i|
|00001630| 6e 70 75 74 29 0a 20 20 | 20 20 20 46 49 4c 45 20 |nput). | FILE |
|00001640| 2a 69 6e 70 75 74 3b 0a | 7b 0a 20 20 69 6e 74 20 |*input;.|{. int |
|00001650| 78 3b 0a 20 20 69 66 20 | 28 20 68 69 67 68 5f 62 |x;. if |( high_b|
|00001660| 79 74 65 5f 66 69 72 73 | 74 20 29 0a 20 20 20 20 |yte_firs|t ). |
|00001670| 7b 0a 20 20 20 20 20 20 | 78 20 3d 20 28 28 63 68 |{. |x = ((ch|
|00001680| 61 72 29 20 72 65 61 64 | 5f 62 79 74 65 20 28 69 |ar) read|_byte (i|
|00001690| 6e 70 75 74 29 29 20 3c | 3c 20 38 3b 20 2f 2a 20 |nput)) <|< 8; /* |
|000016a0| 67 65 74 20 73 69 67 6e | 20 66 72 6f 6d 20 68 69 |get sign| from hi|
|000016b0| 67 68 20 62 79 74 65 20 | 2a 2f 0a 20 20 20 20 20 |gh byte |*/. |
|000016c0| 20 78 20 7c 3d 20 72 65 | 61 64 5f 62 79 74 65 20 | x |= re|ad_byte |
|000016d0| 28 69 6e 70 75 74 29 20 | 26 20 30 78 46 46 3b 20 |(input) |& 0xFF; |
|000016e0| 2f 2a 20 6e 6f 74 20 66 | 72 6f 6d 20 6c 6f 77 20 |/* not f|rom low |
|000016f0| 62 79 74 65 20 2a 2f 0a | 20 20 20 20 7d 0a 20 20 |byte */.| }. |
|00001700| 65 6c 73 65 0a 20 20 20 | 20 7b 0a 20 20 20 20 20 |else. | {. |
|00001710| 20 78 20 3d 20 72 65 61 | 64 5f 62 79 74 65 20 28 | x = rea|d_byte (|
|00001720| 69 6e 70 75 74 29 20 26 | 20 30 78 46 46 3b 20 2f |input) &| 0xFF; /|
|00001730| 2a 20 69 6e 67 6e 6f 72 | 65 20 73 69 67 6e 20 69 |* ingnor|e sign i|
|00001740| 6e 20 6c 6f 77 20 62 79 | 74 65 20 2a 2f 0a 20 20 |n low by|te */. |
|00001750| 20 20 20 20 78 20 7c 3d | 20 28 28 63 68 61 72 29 | x |=| ((char)|
|00001760| 20 72 65 61 64 5f 62 79 | 74 65 20 28 69 6e 70 75 | read_by|te (inpu|
|00001770| 74 29 29 20 3c 3c 20 38 | 3b 20 2f 2a 20 67 65 74 |t)) << 8|; /* get|
|00001780| 20 73 69 67 6e 20 66 72 | 6f 6d 20 68 69 67 68 20 | sign fr|om high |
|00001790| 62 79 74 65 20 2a 2f 0a | 20 20 20 20 7d 0a 20 20 |byte */.| }. |
|000017a0| 69 66 20 28 20 21 20 73 | 69 67 6e 65 64 5f 69 6e |if ( ! s|igned_in|
|000017b0| 70 75 74 20 29 0a 20 20 | 20 20 7b 0a 20 20 20 20 |put ). | {. |
|000017c0| 20 20 78 20 26 3d 20 30 | 78 46 46 46 46 3b 0a 20 | x &= 0|xFFFF;. |
|000017d0| 20 20 20 7d 0a 0a 20 20 | 72 65 74 75 72 6e 20 78 | }.. |return x|
|000017e0| 3b 0a 7d 0a 20 20 0a 2f | 2a 20 20 52 65 61 64 20 |;.}. ./|* Read |
|000017f0| 61 20 73 74 72 69 6e 67 | 2c 20 63 68 61 6e 67 65 |a string|, change|
|00001800| 20 74 65 72 6d 69 6e 61 | 74 69 6f 6e 20 74 6f 20 | termina|tion to |
|00001810| 6e 75 6c 6c 2e 0a 20 20 | 20 20 6e 6f 74 65 3a 20 |null.. | note: |
|00001820| 73 74 72 69 6e 67 20 28 | 62 75 66 66 65 72 29 20 |string (|buffer) |
|00001830| 72 65 61 64 73 20 61 20 | 6e 65 77 6c 69 6e 65 20 |reads a |newline |
|00001840| 74 65 72 6d 69 6e 61 74 | 65 64 20 73 74 72 69 6e |terminat|ed strin|
|00001850| 67 2e 20 2a 2f 0a 0a 76 | 6f 69 64 0a 72 65 61 64 |g. */..v|oid.read|
|00001860| 5f 73 74 72 69 6e 67 20 | 28 69 6e 70 75 74 2c 20 |_string |(input, |
|00001870| 62 75 66 66 65 72 2c 20 | 62 75 66 66 65 72 5f 6c |buffer, |buffer_l|
|00001880| 65 6e 67 74 68 29 0a 20 | 20 20 20 20 46 49 4c 45 |ength). | FILE|
|00001890| 20 2a 69 6e 70 75 74 3b | 0a 20 20 20 20 20 63 68 | *input;|. ch|
|000018a0| 61 72 20 2a 62 75 66 66 | 65 72 3b 0a 20 20 20 20 |ar *buff|er;. |
|000018b0| 20 69 6e 74 20 62 75 66 | 66 65 72 5f 6c 65 6e 67 | int buf|fer_leng|
|000018c0| 74 68 3b 0a 7b 0a 20 20 | 69 6e 74 20 6c 65 6e 67 |th;.{. |int leng|
|000018d0| 74 68 3d 30 3b 0a 20 20 | 63 68 61 72 20 74 65 72 |th=0;. |char ter|
|000018e0| 6d 69 6e 61 74 69 6f 6e | 20 3d 20 27 5c 6e 27 3b |mination| = '\n';|
|000018f0| 0a 20 20 63 68 61 72 20 | 63 20 3d 20 27 5c 30 27 |. char |c = '\0'|
|00001900| 3b 0a 0a 20 20 77 68 69 | 6c 65 20 28 21 66 65 6f |;.. whi|le (!feo|
|00001910| 66 20 28 69 6e 70 75 74 | 29 29 0a 20 20 20 20 7b |f (input|)). {|
|00001920| 0a 20 20 20 20 20 20 69 | 66 20 28 6c 65 6e 67 74 |. i|f (lengt|
|00001930| 68 20 3e 20 62 75 66 66 | 65 72 5f 6c 65 6e 67 74 |h > buff|er_lengt|
|00001940| 68 29 0a 09 7b 0a 09 20 | 20 62 75 66 66 65 72 5f |h)..{.. | buffer_|
|00001950| 6c 65 6e 67 74 68 20 2a | 3d 20 32 3b 0a 09 20 20 |length *|= 2;.. |
|00001960| 62 75 66 66 65 72 20 3d | 20 28 63 68 61 72 20 2a |buffer =| (char *|
|00001970| 29 20 72 65 61 6c 6c 6f | 63 20 28 62 75 66 66 65 |) reallo|c (buffe|
|00001980| 72 2c 20 62 75 66 66 65 | 72 5f 6c 65 6e 67 74 68 |r, buffe|r_length|
|00001990| 29 3b 0a 09 20 20 69 66 | 20 28 62 75 66 66 65 72 |);.. if| (buffer|
|000019a0| 20 3c 3d 20 28 63 68 61 | 72 20 2a 29 20 30 29 0a | <= (cha|r *) 0).|
|000019b0| 09 20 20 20 20 7b 0a 09 | 20 20 20 20 20 20 63 6c |. {..| cl|
|000019c0| 6f 73 65 70 6c 20 28 29 | 3b 0a 09 20 20 20 20 20 |osepl ()|;.. |
|000019d0| 20 70 65 72 72 6f 72 20 | 28 22 72 65 61 6c 6c 6f | perror |("reallo|
|000019e0| 63 20 66 61 69 6c 65 64 | 3a 22 29 3b 0a 09 20 20 |c failed|:");.. |
|000019f0| 20 20 20 20 65 78 69 74 | 20 28 2d 31 29 3b 0a 09 | exit| (-1);..|
|00001a00| 20 20 20 20 7d 0a 09 7d | 0a 20 20 20 20 20 20 63 | }..}|. c|
|00001a10| 20 3d 20 72 65 61 64 5f | 62 79 74 65 20 28 69 6e | = read_|byte (in|
|00001a20| 70 75 74 29 3b 0a 20 20 | 20 20 20 20 69 66 20 28 |put);. | if (|
|00001a30| 63 20 3d 3d 20 74 65 72 | 6d 69 6e 61 74 69 6f 6e |c == ter|mination|
|00001a40| 29 0a 09 62 72 65 61 6b | 3b 0a 20 20 20 20 20 20 |)..break|;. |
|00001a50| 62 75 66 66 65 72 20 5b | 6c 65 6e 67 74 68 2b 2b |buffer [|length++|
|00001a60| 5d 20 3d 20 63 3b 0a 20 | 20 20 20 7d 0a 0a 20 20 |] = c;. | }.. |
|00001a70| 62 75 66 66 65 72 20 5b | 6c 65 6e 67 74 68 5d 20 |buffer [|length] |
|00001a80| 3d 20 27 5c 30 27 3b 09 | 2f 2a 20 20 6e 75 6c 6c |= '\0';.|/* null|
|00001a90| 20 74 65 72 6d 69 6e 61 | 74 65 20 6c 61 62 65 6c | termina|te label|
|00001aa0| 20 2a 2f 0a 7d 0a 0a 0a | 2f 2a 20 72 65 61 64 5f | */.}...|/* read_|
|00001ab0| 70 6c 6f 74 20 72 65 61 | 64 73 20 61 20 70 6c 6f |plot rea|ds a plo|
|00001ac0| 74 20 66 69 6c 65 20 66 | 72 6f 6d 20 74 68 65 20 |t file f|rom the |
|00001ad0| 73 74 61 6e 64 61 72 64 | 20 69 6e 70 75 74 20 61 |standard| input a|
|00001ae0| 6e 64 20 63 61 6c 6c 73 | 0a 20 20 20 61 20 70 6c |nd calls|. a pl|
|00001af0| 6f 74 20 66 75 6e 63 74 | 69 6f 6e 20 61 63 63 6f |ot funct|ion acco|
|00001b00| 72 64 69 6e 67 20 74 6f | 20 65 61 63 68 20 70 6c |rding to| each pl|
|00001b10| 6f 74 20 69 6e 73 74 72 | 75 63 74 69 6f 6e 20 66 |ot instr|uction f|
|00001b20| 6f 75 6e 64 20 69 6e 20 | 74 68 65 0a 20 20 20 66 |ound in |the. f|
|00001b30| 69 6c 65 2e 20 2a 2f 0a | 0a 76 6f 69 64 0a 72 65 |ile. */.|.void.re|
|00001b40| 61 64 5f 70 6c 6f 74 20 | 28 69 6e 5f 73 74 72 65 |ad_plot |(in_stre|
|00001b50| 61 6d 2c 20 62 75 66 66 | 65 72 2c 20 62 75 66 66 |am, buff|er, buff|
|00001b60| 65 72 5f 6c 65 6e 67 74 | 68 29 0a 20 20 20 20 20 |er_lengt|h). |
|00001b70| 46 49 4c 45 20 2a 69 6e | 5f 73 74 72 65 61 6d 3b |FILE *in|_stream;|
|00001b80| 0a 20 20 20 20 20 63 68 | 61 72 20 2a 62 75 66 66 |. ch|ar *buff|
|00001b90| 65 72 3b 0a 20 20 20 20 | 20 69 6e 74 20 20 62 75 |er;. | int bu|
|00001ba0| 66 66 65 72 5f 6c 65 6e | 67 74 68 3b 0a 7b 0a 20 |ffer_len|gth;.{. |
|00001bb0| 20 63 68 61 72 20 78 5f | 61 64 6a 75 73 74 2c 20 | char x_|adjust, |
|00001bc0| 79 5f 61 64 6a 75 73 74 | 3b 0a 20 20 69 6e 74 20 |y_adjust|;. int |
|00001bd0| 78 30 2c 20 79 30 2c 20 | 78 31 2c 20 79 31 2c 20 |x0, y0, |x1, y1, |
|00001be0| 78 32 2c 20 79 32 3b 0a | 20 20 69 6e 74 20 69 6e |x2, y2;.| int in|
|00001bf0| 73 74 72 75 63 74 69 6f | 6e 3b 0a 0a 20 20 69 6e |structio|n;.. in|
|00001c00| 73 74 72 75 63 74 69 6f | 6e 20 3d 20 72 65 61 64 |structio|n = read|
|00001c10| 5f 62 79 74 65 20 28 69 | 6e 5f 73 74 72 65 61 6d |_byte (i|n_stream|
|00001c20| 29 3b 0a 20 20 77 68 69 | 6c 65 20 28 21 66 65 6f |);. whi|le (!feo|
|00001c30| 66 20 28 69 6e 5f 73 74 | 72 65 61 6d 29 29 0a 20 |f (in_st|ream)). |
|00001c40| 20 20 20 7b 0a 20 20 20 | 20 20 20 73 77 69 74 63 | {. | switc|
|00001c50| 68 20 28 69 6e 73 74 72 | 75 63 74 69 6f 6e 29 0a |h (instr|uction).|
|00001c60| 09 7b 0a 09 20 20 2f 2a | 20 20 4e 6f 74 65 3a 20 |.{.. /*| Note: |
|00001c70| 77 65 20 6d 75 73 74 20 | 67 65 74 20 61 6c 6c 20 |we must |get all |
|00001c80| 62 75 74 20 74 68 65 20 | 6c 61 73 74 20 61 72 67 |but the |last arg|
|00001c90| 75 6d 65 6e 74 20 62 65 | 66 6f 72 65 20 63 61 6c |ument be|fore cal|
|00001ca0| 6c 69 6e 67 20 74 6f 0a | 09 20 20 20 20 20 20 65 |ling to.|. e|
|00001cb0| 6e 73 75 72 65 20 72 65 | 61 64 69 6e 67 20 74 68 |nsure re|ading th|
|00001cc0| 65 6d 20 69 6e 20 74 68 | 65 20 70 72 6f 70 65 72 |em in th|e proper|
|00001cd0| 20 6f 72 64 65 72 2e 20 | 2a 2f 0a 09 20 20 0a 09 | order. |*/.. ..|
|00001ce0| 63 61 73 65 20 41 4c 41 | 42 45 4c 3a 0a 09 20 20 |case ALA|BEL:.. |
|00001cf0| 78 5f 61 64 6a 75 73 74 | 20 3d 20 72 65 61 64 5f |x_adjust| = read_|
|00001d00| 62 79 74 65 20 28 69 6e | 5f 73 74 72 65 61 6d 29 |byte (in|_stream)|
|00001d10| 3b 0a 09 20 20 79 5f 61 | 64 6a 75 73 74 20 3d 20 |;.. y_a|djust = |
|00001d20| 72 65 61 64 5f 62 79 74 | 65 20 28 69 6e 5f 73 74 |read_byt|e (in_st|
|00001d30| 72 65 61 6d 29 3b 20 0a | 09 20 20 72 65 61 64 5f |ream); .|. read_|
|00001d40| 73 74 72 69 6e 67 20 28 | 69 6e 5f 73 74 72 65 61 |string (|in_strea|
|00001d50| 6d 2c 20 62 75 66 66 65 | 72 2c 20 62 75 66 66 65 |m, buffe|r, buffe|
|00001d60| 72 5f 6c 65 6e 67 74 68 | 29 3b 0a 09 20 20 61 6c |r_length|);.. al|
|00001d70| 61 62 65 6c 20 28 78 5f | 61 64 6a 75 73 74 2c 20 |abel (x_|adjust, |
|00001d80| 79 5f 61 64 6a 75 73 74 | 2c 20 62 75 66 66 65 72 |y_adjust|, buffer|
|00001d90| 29 3b 0a 09 20 20 62 72 | 65 61 6b 3b 0a 09 63 61 |);.. br|eak;..ca|
|00001da0| 73 65 20 41 52 43 3a 0a | 09 20 20 78 30 20 3d 20 |se ARC:.|. x0 = |
|00001db0| 63 6f 6f 72 64 20 28 69 | 6e 5f 73 74 72 65 61 6d |coord (i|n_stream|
|00001dc0| 29 3b 0a 09 20 20 79 30 | 20 3d 20 63 6f 6f 72 64 |);.. y0| = coord|
|00001dd0| 20 28 69 6e 5f 73 74 72 | 65 61 6d 29 3b 0a 09 20 | (in_str|eam);.. |
|00001de0| 20 78 31 20 3d 20 63 6f | 6f 72 64 20 28 69 6e 5f | x1 = co|ord (in_|
|00001df0| 73 74 72 65 61 6d 29 3b | 0a 09 20 20 79 31 20 3d |stream);|.. y1 =|
|00001e00| 20 63 6f 6f 72 64 20 28 | 69 6e 5f 73 74 72 65 61 | coord (|in_strea|
|00001e10| 6d 29 3b 20 0a 09 20 20 | 78 32 20 3d 20 63 6f 6f |m); .. |x2 = coo|
|00001e20| 72 64 20 28 69 6e 5f 73 | 74 72 65 61 6d 29 3b 0a |rd (in_s|tream);.|
|00001e30| 09 20 20 79 32 20 3d 20 | 63 6f 6f 72 64 20 28 69 |. y2 = |coord (i|
|00001e40| 6e 5f 73 74 72 65 61 6d | 29 3b 20 0a 09 20 20 61 |n_stream|); .. a|
|00001e50| 72 63 20 28 78 30 2c 20 | 79 30 2c 20 78 31 2c 20 |rc (x0, |y0, x1, |
|00001e60| 79 31 2c 20 78 32 2c 20 | 79 32 29 3b 0a 09 20 20 |y1, x2, |y2);.. |
|00001e70| 62 72 65 61 6b 3b 0a 09 | 63 61 73 65 20 43 49 52 |break;..|case CIR|
|00001e80| 43 4c 45 3a 0a 09 20 20 | 78 30 20 3d 20 63 6f 6f |CLE:.. |x0 = coo|
|00001e90| 72 64 20 28 69 6e 5f 73 | 74 72 65 61 6d 29 3b 0a |rd (in_s|tream);.|
|00001ea0| 09 20 20 79 30 20 3d 20 | 63 6f 6f 72 64 20 28 69 |. y0 = |coord (i|
|00001eb0| 6e 5f 73 74 72 65 61 6d | 29 3b 0a 09 20 20 78 31 |n_stream|);.. x1|
|00001ec0| 20 3d 20 63 6f 6f 72 64 | 20 28 69 6e 5f 73 74 72 | = coord| (in_str|
|00001ed0| 65 61 6d 29 3b 0a 09 20 | 20 63 69 72 63 6c 65 20 |eam);.. | circle |
|00001ee0| 28 78 30 2c 20 79 30 2c | 20 78 31 29 3b 0a 09 20 |(x0, y0,| x1);.. |
|00001ef0| 20 62 72 65 61 6b 3b 0a | 09 63 61 73 65 20 43 4f | break;.|.case CO|
|00001f00| 4c 4f 52 3a 0a 09 20 20 | 78 30 20 3d 20 63 6f 6f |LOR:.. |x0 = coo|
|00001f10| 72 64 20 28 69 6e 5f 73 | 74 72 65 61 6d 29 26 30 |rd (in_s|tream)&0|
|00001f20| 78 46 46 46 46 3b 0a 09 | 20 20 79 30 20 3d 20 63 |xFFFF;..| y0 = c|
|00001f30| 6f 6f 72 64 20 28 69 6e | 5f 73 74 72 65 61 6d 29 |oord (in|_stream)|
|00001f40| 26 30 78 46 46 46 46 3b | 0a 09 20 20 78 31 20 3d |&0xFFFF;|.. x1 =|
|00001f50| 20 63 6f 6f 72 64 20 28 | 69 6e 5f 73 74 72 65 61 | coord (|in_strea|
|00001f60| 6d 29 26 30 78 46 46 46 | 46 3b 0a 09 20 20 63 6f |m)&0xFFF|F;.. co|
|00001f70| 6c 6f 72 20 28 78 30 2c | 20 79 30 2c 20 78 31 29 |lor (x0,| y0, x1)|
|00001f80| 3b 0a 09 20 20 62 72 65 | 61 6b 3b 0a 09 63 61 73 |;.. bre|ak;..cas|
|00001f90| 65 20 43 4f 4e 54 3a 0a | 09 20 20 78 30 20 3d 20 |e CONT:.|. x0 = |
|00001fa0| 63 6f 6f 72 64 20 28 69 | 6e 5f 73 74 72 65 61 6d |coord (i|n_stream|
|00001fb0| 29 3b 0a 09 20 20 79 30 | 20 3d 20 63 6f 6f 72 64 |);.. y0| = coord|
|00001fc0| 20 28 69 6e 5f 73 74 72 | 65 61 6d 29 3b 0a 09 20 | (in_str|eam);.. |
|00001fd0| 20 63 6f 6e 74 20 28 78 | 30 2c 20 79 30 29 3b 0a | cont (x|0, y0);.|
|00001fe0| 09 20 20 62 72 65 61 6b | 3b 0a 09 63 61 73 65 20 |. break|;..case |
|00001ff0| 45 52 41 53 45 3a 0a 09 | 20 20 65 72 61 73 65 20 |ERASE:..| erase |
|00002000| 28 29 3b 0a 09 20 20 62 | 72 65 61 6b 3b 0a 09 63 |();.. b|reak;..c|
|00002010| 61 73 65 20 46 49 4c 4c | 3a 0a 09 20 20 66 69 6c |ase FILL|:.. fil|
|00002020| 6c 20 28 63 6f 6f 72 64 | 20 28 69 6e 5f 73 74 72 |l (coord| (in_str|
|00002030| 65 61 6d 29 26 30 78 46 | 46 46 46 29 3b 20 62 72 |eam)&0xF|FFF); br|
|00002040| 65 61 6b 3b 0a 09 63 61 | 73 65 20 46 4f 4e 54 3a |eak;..ca|se FONT:|
|00002050| 0a 09 20 20 72 65 61 64 | 5f 73 74 72 69 6e 67 20 |.. read|_string |
|00002060| 28 69 6e 5f 73 74 72 65 | 61 6d 2c 20 62 75 66 66 |(in_stre|am, buff|
|00002070| 65 72 2c 20 62 75 66 66 | 65 72 5f 6c 65 6e 67 74 |er, buff|er_lengt|
|00002080| 68 29 3b 0a 09 20 20 66 | 6f 6e 74 6e 61 6d 65 20 |h);.. f|ontname |
|00002090| 28 62 75 66 66 65 72 29 | 3b 0a 09 20 20 62 72 65 |(buffer)|;.. bre|
|000020a0| 61 6b 3b 0a 09 63 61 73 | 65 20 46 4f 4e 54 53 49 |ak;..cas|e FONTSI|
|000020b0| 5a 45 3a 0a 09 20 20 66 | 6f 6e 74 73 69 7a 65 20 |ZE:.. f|ontsize |
|000020c0| 28 63 6f 6f 72 64 20 28 | 69 6e 5f 73 74 72 65 61 |(coord (|in_strea|
|000020d0| 6d 29 29 3b 0a 09 20 20 | 62 72 65 61 6b 3b 0a 09 |m));.. |break;..|
|000020e0| 63 61 73 65 20 4c 41 42 | 45 4c 3a 0a 09 20 20 72 |case LAB|EL:.. r|
|000020f0| 65 61 64 5f 73 74 72 69 | 6e 67 20 28 69 6e 5f 73 |ead_stri|ng (in_s|
|00002100| 74 72 65 61 6d 2c 20 62 | 75 66 66 65 72 2c 20 62 |tream, b|uffer, b|
|00002110| 75 66 66 65 72 5f 6c 65 | 6e 67 74 68 29 3b 0a 09 |uffer_le|ngth);..|
|00002120| 20 20 6c 61 62 65 6c 20 | 28 62 75 66 66 65 72 29 | label |(buffer)|
|00002130| 3b 0a 09 20 20 62 72 65 | 61 6b 3b 0a 09 63 61 73 |;.. bre|ak;..cas|
|00002140| 65 20 4c 49 4e 45 3a 0a | 09 20 20 78 30 20 3d 20 |e LINE:.|. x0 = |
|00002150| 63 6f 6f 72 64 20 28 69 | 6e 5f 73 74 72 65 61 6d |coord (i|n_stream|
|00002160| 29 3b 0a 09 20 20 79 30 | 20 3d 20 63 6f 6f 72 64 |);.. y0| = coord|
|00002170| 20 28 69 6e 5f 73 74 72 | 65 61 6d 29 3b 0a 09 20 | (in_str|eam);.. |
|00002180| 20 78 31 20 3d 20 63 6f | 6f 72 64 20 28 69 6e 5f | x1 = co|ord (in_|
|00002190| 73 74 72 65 61 6d 29 3b | 0a 09 20 20 79 31 20 3d |stream);|.. y1 =|
|000021a0| 20 63 6f 6f 72 64 20 28 | 69 6e 5f 73 74 72 65 61 | coord (|in_strea|
|000021b0| 6d 29 3b 20 0a 09 20 20 | 6c 69 6e 65 20 28 78 30 |m); .. |line (x0|
|000021c0| 2c 20 79 30 2c 20 78 31 | 2c 20 79 31 29 3b 0a 09 |, y0, x1|, y1);..|
|000021d0| 20 20 62 72 65 61 6b 3b | 0a 09 63 61 73 65 20 4c | break;|..case L|
|000021e0| 49 4e 45 4d 4f 44 3a 0a | 09 20 20 72 65 61 64 5f |INEMOD:.|. read_|
|000021f0| 73 74 72 69 6e 67 20 28 | 69 6e 5f 73 74 72 65 61 |string (|in_strea|
|00002200| 6d 2c 20 62 75 66 66 65 | 72 2c 20 62 75 66 66 65 |m, buffe|r, buffe|
|00002210| 72 5f 6c 65 6e 67 74 68 | 29 3b 0a 09 20 20 6c 69 |r_length|);.. li|
|00002220| 6e 65 6d 6f 64 20 28 62 | 75 66 66 65 72 29 3b 0a |nemod (b|uffer);.|
|00002230| 09 20 20 62 72 65 61 6b | 3b 0a 09 63 61 73 65 20 |. break|;..case |
|00002240| 4d 4f 56 45 3a 0a 09 20 | 20 78 30 20 3d 20 63 6f |MOVE:.. | x0 = co|
|00002250| 6f 72 64 20 28 69 6e 5f | 73 74 72 65 61 6d 29 3b |ord (in_|stream);|
|00002260| 0a 09 20 20 79 30 20 3d | 20 63 6f 6f 72 64 20 28 |.. y0 =| coord (|
|00002270| 69 6e 5f 73 74 72 65 61 | 6d 29 3b 0a 09 20 20 6d |in_strea|m);.. m|
|00002280| 6f 76 65 20 28 78 30 2c | 20 79 30 29 3b 0a 09 20 |ove (x0,| y0);.. |
|00002290| 20 62 72 65 61 6b 3b 0a | 09 63 61 73 65 20 50 4f | break;.|.case PO|
|000022a0| 49 4e 54 3a 0a 09 20 20 | 78 30 20 3d 20 63 6f 6f |INT:.. |x0 = coo|
|000022b0| 72 64 20 28 69 6e 5f 73 | 74 72 65 61 6d 29 3b 0a |rd (in_s|tream);.|
|000022c0| 09 20 20 79 30 20 3d 20 | 63 6f 6f 72 64 20 28 69 |. y0 = |coord (i|
|000022d0| 6e 5f 73 74 72 65 61 6d | 29 3b 0a 09 20 20 70 6f |n_stream|);.. po|
|000022e0| 69 6e 74 20 28 78 30 2c | 20 79 30 29 3b 0a 09 20 |int (x0,| y0);.. |
|000022f0| 20 62 72 65 61 6b 3b 0a | 09 63 61 73 65 20 52 4f | break;.|.case RO|
|00002300| 54 41 54 45 3a 0a 09 20 | 20 78 30 20 3d 20 63 6f |TATE:.. | x0 = co|
|00002310| 6f 72 64 20 28 69 6e 5f | 73 74 72 65 61 6d 29 3b |ord (in_|stream);|
|00002320| 0a 09 20 20 79 30 20 3d | 20 63 6f 6f 72 64 20 28 |.. y0 =| coord (|
|00002330| 69 6e 5f 73 74 72 65 61 | 6d 29 3b 0a 09 20 20 78 |in_strea|m);.. x|
|00002340| 31 20 3d 20 63 6f 6f 72 | 64 20 28 69 6e 5f 73 74 |1 = coor|d (in_st|
|00002350| 72 65 61 6d 29 3b 0a 09 | 20 20 72 6f 74 61 74 65 |ream);..| rotate|
|00002360| 20 28 78 30 2c 20 79 30 | 2c 20 78 31 29 3b 0a 09 | (x0, y0|, x1);..|
|00002370| 20 20 62 72 65 61 6b 3b | 0a 09 63 61 73 65 20 53 | break;|..case S|
|00002380| 50 41 43 45 3a 0a 09 20 | 20 78 30 20 3d 20 63 6f |PACE:.. | x0 = co|
|00002390| 6f 72 64 20 28 69 6e 5f | 73 74 72 65 61 6d 29 3b |ord (in_|stream);|
|000023a0| 0a 09 20 20 79 30 20 3d | 20 63 6f 6f 72 64 20 28 |.. y0 =| coord (|
|000023b0| 69 6e 5f 73 74 72 65 61 | 6d 29 3b 0a 09 20 20 78 |in_strea|m);.. x|
|000023c0| 31 20 3d 20 63 6f 6f 72 | 64 20 28 69 6e 5f 73 74 |1 = coor|d (in_st|
|000023d0| 72 65 61 6d 29 3b 0a 09 | 20 20 79 31 20 3d 20 63 |ream);..| y1 = c|
|000023e0| 6f 6f 72 64 20 28 69 6e | 5f 73 74 72 65 61 6d 29 |oord (in|_stream)|
|000023f0| 3b 20 0a 09 20 20 69 66 | 20 28 67 75 65 73 73 5f |; .. if| (guess_|
|00002400| 62 79 74 65 5f 6f 72 64 | 65 72 29 0a 09 20 20 20 |byte_ord|er).. |
|00002410| 20 66 69 6e 64 5f 62 79 | 74 65 5f 6f 72 64 65 72 | find_by|te_order|
|00002420| 20 28 26 78 30 2c 20 26 | 79 30 2c 20 26 78 31 2c | (&x0, &|y0, &x1,|
|00002430| 20 26 79 31 29 3b 0a 09 | 20 20 73 70 61 63 65 20 | &y1);..| space |
|00002440| 28 78 30 2c 20 79 30 2c | 20 78 31 2c 20 79 31 29 |(x0, y0,| x1, y1)|
|00002450| 3b 0a 09 20 20 62 72 65 | 61 6b 3b 0a 09 64 65 66 |;.. bre|ak;..def|
|00002460| 61 75 6c 74 3a 0a 09 20 | 20 66 70 72 69 6e 74 66 |ault:.. | fprintf|
|00002470| 20 28 73 74 64 65 72 72 | 2c 20 22 55 6e 72 65 63 | (stderr|, "Unrec|
|00002480| 6f 67 6e 69 7a 65 64 20 | 70 6c 6f 74 20 63 6f 6d |ognized |plot com|
|00002490| 6d 61 6e 64 20 60 25 63 | 27 20 69 67 6e 6f 72 65 |mand `%c|' ignore|
|000024a0| 64 2e 5c 6e 22 2c 20 69 | 6e 73 74 72 75 63 74 69 |d.\n", i|nstructi|
|000024b0| 6f 6e 29 3b 0a 09 7d 0a | 20 20 20 20 20 20 69 6e |on);..}.| in|
|000024c0| 73 74 72 75 63 74 69 6f | 6e 20 3d 20 72 65 61 64 |structio|n = read|
|000024d0| 5f 62 79 74 65 20 28 69 | 6e 5f 73 74 72 65 61 6d |_byte (i|n_stream|
|000024e0| 29 3b 0a 20 20 20 20 7d | 0a 20 20 72 65 74 75 72 |);. }|. retur|
|000024f0| 6e 3b 0a 7d 0a 0a 63 68 | 61 72 20 2a 70 72 6f 67 |n;.}..ch|ar *prog|
|00002500| 6e 61 6d 65 3b 09 09 09 | 2f 2a 20 61 72 67 76 5b |name;...|/* argv[|
|00002510| 30 5d 20 6f 72 20 74 68 | 65 20 6e 61 6d 65 20 6f |0] or th|e name o|
|00002520| 66 20 74 68 69 73 20 70 | 72 6f 67 72 61 6d 20 2a |f this p|rogram *|
|00002530| 2f 0a 0a 76 6f 69 64 0a | 64 69 73 70 6c 61 79 5f |/..void.|display_|
|00002540| 76 65 72 73 69 6f 6e 20 | 28 29 0a 7b 0a 20 20 20 |version |().{. |
|00002550| 20 28 76 6f 69 64 29 20 | 66 70 72 69 6e 74 66 20 | (void) |fprintf |
|00002560| 28 73 74 64 65 72 72 2c | 20 22 5c 0a 25 73 20 76 |(stderr,| "\.%s v|
|00002570| 65 72 73 69 6f 6e 20 25 | 73 2c 20 43 6f 70 79 72 |ersion %|s, Copyr|
|00002580| 69 67 68 74 20 28 43 29 | 20 31 39 38 39 20 46 72 |ight (C)| 1989 Fr|
|00002590| 65 65 20 53 6f 66 74 77 | 61 72 65 20 46 6f 75 6e |ee Softw|are Foun|
|000025a0| 64 61 74 69 6f 6e 2c 20 | 49 6e 63 2e 5c 6e 5c 0a |dation, |Inc.\n\.|
|000025b0| 70 6c 6f 74 20 63 6f 6d | 65 73 20 77 69 74 68 20 |plot com|es with |
|000025c0| 41 42 53 4f 4c 55 54 45 | 4c 59 20 4e 4f 20 57 41 |ABSOLUTE|LY NO WA|
|000025d0| 52 52 41 4e 54 59 3b 20 | 74 79 70 65 20 60 25 73 |RRANTY; |type `%s|
|000025e0| 20 2b 77 61 72 72 61 6e | 74 79 27 5c 6e 5c 0a 66 | +warran|ty'\n\.f|
|000025f0| 6f 72 20 64 65 74 61 69 | 6c 73 2e 20 20 54 68 69 |or detai|ls. Thi|
|00002600| 73 20 69 73 20 66 72 65 | 65 20 73 6f 66 74 77 61 |s is fre|e softwa|
|00002610| 72 65 2c 20 61 6e 64 20 | 79 6f 75 20 61 72 65 20 |re, and |you are |
|00002620| 77 65 6c 63 6f 6d 65 20 | 74 6f 20 72 65 64 69 73 |welcome |to redis|
|00002630| 74 72 69 62 75 74 65 5c | 6e 5c 0a 69 74 3b 20 54 |tribute\|n\.it; T|
|00002640| 79 70 65 20 60 70 6c 6f | 74 32 70 73 20 2b 63 6f |ype `plo|t2ps +co|
|00002650| 70 79 69 6e 67 27 20 74 | 6f 20 76 69 65 77 20 74 |pying' t|o view t|
|00002660| 68 65 20 63 6f 70 79 69 | 6e 67 20 63 6f 6e 64 69 |he copyi|ng condi|
|00002670| 74 69 6f 6e 73 2e 5c 6e | 22 2c 0a 09 09 20 20 20 |tions.\n|",... |
|00002680| 20 70 72 6f 67 6e 61 6d | 65 2c 20 56 45 52 53 2c | prognam|e, VERS,|
|00002690| 20 70 72 6f 67 6e 61 6d | 65 29 3b 0a 7d 0a 0a 2f | prognam|e);.}../|
|000026a0| 2a 20 4c 6f 6e 67 20 6f | 70 74 69 6f 6e 73 20 77 |* Long o|ptions w|
|000026b0| 65 20 72 65 63 6f 67 6e | 69 7a 65 20 2a 2f 0a 23 |e recogn|ize */.#|
|000026c0| 64 65 66 69 6e 65 09 41 | 52 47 5f 4e 4f 4e 45 09 |define.A|RG_NONE.|
|000026d0| 30 0a 23 64 65 66 69 6e | 65 09 41 52 47 5f 52 45 |0.#defin|e.ARG_RE|
|000026e0| 51 55 49 52 45 44 09 31 | 0a 23 64 65 66 69 6e 65 |QUIRED.1|.#define|
|000026f0| 09 41 52 47 5f 4f 50 54 | 49 4f 4e 41 4c 09 32 0a |.ARG_OPT|IONAL.2.|
|00002700| 0a 73 74 72 75 63 74 20 | 6f 70 74 69 6f 6e 09 6c |.struct |option.l|
|00002710| 6f 6e 67 5f 6f 70 74 69 | 6f 6e 73 5b 5d 20 3d 20 |ong_opti|ons[] = |
|00002720| 7b 0a 20 20 20 20 7b 20 | 22 66 6f 6e 74 73 69 7a |{. { |"fontsiz|
|00002730| 65 22 2c 09 41 52 47 5f | 52 45 51 55 49 52 45 44 |e",.ARG_|REQUIRED|
|00002740| 2c 09 4e 55 4c 4c 2c 20 | 27 66 27 20 7d 2c 0a 20 |,.NULL, |'f' },. |
|00002750| 20 20 20 7b 20 22 66 6f | 6e 74 6e 61 6d 65 22 2c | { "fo|ntname",|
|00002760| 09 41 52 47 5f 52 45 51 | 55 49 52 45 44 2c 09 4e |.ARG_REQ|UIRED,.N|
|00002770| 55 4c 4c 2c 20 27 46 27 | 20 7d 2c 0a 20 20 20 20 |ULL, 'F'| },. |
|00002780| 7b 20 22 68 69 67 68 2d | 62 79 74 65 2d 66 69 72 |{ "high-|byte-fir|
|00002790| 73 74 22 2c 20 41 52 47 | 5f 4e 4f 4e 45 2c 09 4e |st", ARG|_NONE,.N|
|000027a0| 55 4c 4c 2c 20 27 68 27 | 20 7d 2c 0a 20 20 20 20 |ULL, 'h'| },. |
|000027b0| 7b 20 22 6c 6f 77 2d 62 | 79 74 65 2d 66 69 72 73 |{ "low-b|yte-firs|
|000027c0| 74 22 2c 09 41 52 47 5f | 4e 4f 4e 45 2c 09 4e 55 |t",.ARG_|NONE,.NU|
|000027d0| 4c 4c 2c 20 27 6c 27 20 | 7d 2c 0a 20 20 20 20 7b |LL, 'l' |},. {|
|000027e0| 20 22 73 69 67 6e 65 64 | 2d 69 6e 70 75 74 22 2c | "signed|-input",|
|000027f0| 09 41 52 47 5f 4e 4f 4e | 45 2c 09 4e 55 4c 4c 2c |.ARG_NON|E,.NULL,|
|00002800| 20 27 73 27 20 7d 2c 0a | 20 20 20 20 7b 20 22 75 | 's' },.| { "u|
|00002810| 6e 73 69 67 6e 65 64 2d | 69 6e 70 75 74 22 2c 09 |nsigned-|input",.|
|00002820| 41 52 47 5f 4e 4f 4e 45 | 2c 09 4e 55 4c 4c 2c 20 |ARG_NONE|,.NULL, |
|00002830| 27 75 27 20 7d 2c 0a 20 | 20 20 20 7b 20 22 77 61 |'u' },. | { "wa|
|00002840| 72 72 61 6e 74 79 22 2c | 09 41 52 47 5f 4e 4f 4e |rranty",|.ARG_NON|
|00002850| 45 2c 09 4e 55 4c 4c 2c | 20 27 57 27 20 7d 2c 0a |E,.NULL,| 'W' },.|
|00002860| 20 20 20 20 7b 20 22 63 | 6f 70 79 69 6e 67 22 2c | { "c|opying",|
|00002870| 09 41 52 47 5f 4e 4f 4e | 45 2c 09 4e 55 4c 4c 2c |.ARG_NON|E,.NULL,|
|00002880| 20 27 43 27 20 7d 2c 0a | 20 20 20 20 7b 20 22 68 | 'C' },.| { "h|
|00002890| 65 6c 70 22 2c 09 09 41 | 52 47 5f 4e 4f 4e 45 2c |elp",..A|RG_NONE,|
|000028a0| 09 4e 55 4c 4c 2c 20 27 | 48 27 20 7d 2c 0a 20 20 |.NULL, '|H' },. |
|000028b0| 20 20 7b 20 22 76 65 72 | 73 69 6f 6e 22 2c 09 41 | { "ver|sion",.A|
|000028c0| 52 47 5f 4e 4f 4e 45 2c | 09 4e 55 4c 4c 2c 20 27 |RG_NONE,|.NULL, '|
|000028d0| 56 27 20 7d 2c 0a 20 20 | 20 20 7b 20 4e 55 4c 4c |V' },. | { NULL|
|000028e0| 2c 09 09 30 2c 09 09 4e | 55 4c 4c 2c 20 30 7d 0a |,..0,..N|ULL, 0}.|
|000028f0| 7d 3b 0a 0a 76 6f 69 64 | 0a 64 69 73 70 6c 61 79 |};..void|.display|
|00002900| 5f 68 65 6c 70 20 28 29 | 0a 7b 0a 20 20 69 6e 74 |_help ()|.{. int|
|00002910| 20 69 3b 0a 20 20 66 70 | 72 69 6e 74 66 20 28 73 | i;. fp|rintf (s|
|00002920| 74 64 65 72 72 2c 20 22 | 75 73 61 67 65 3a 20 25 |tderr, "|usage: %|
|00002930| 73 22 2c 20 70 72 6f 67 | 6e 61 6d 65 29 3b 0a 20 |s", prog|name);. |
|00002940| 20 66 6f 72 20 28 69 3d | 30 3b 20 6c 6f 6e 67 5f | for (i=|0; long_|
|00002950| 6f 70 74 69 6f 6e 73 5b | 69 5d 2e 6e 61 6d 65 3b |options[|i].name;|
|00002960| 20 69 2b 2b 29 0a 20 20 | 20 20 7b 0a 20 20 20 20 | i++). | {. |
|00002970| 20 20 66 70 72 69 6e 74 | 66 20 28 73 74 64 65 72 | fprint|f (stder|
|00002980| 72 2c 20 22 20 5b 2b 25 | 73 22 2c 20 6c 6f 6e 67 |r, " [+%|s", long|
|00002990| 5f 6f 70 74 69 6f 6e 73 | 5b 69 5d 2e 6e 61 6d 65 |_options|[i].name|
|000029a0| 29 3b 0a 20 20 20 20 20 | 20 69 66 20 28 69 73 70 |);. | if (isp|
|000029b0| 72 69 6e 74 20 28 6c 6f | 6e 67 5f 6f 70 74 69 6f |rint (lo|ng_optio|
|000029c0| 6e 73 5b 69 5d 2e 76 61 | 6c 29 29 0a 09 66 70 72 |ns[i].va|l))..fpr|
|000029d0| 69 6e 74 66 20 28 73 74 | 64 65 72 72 2c 20 22 7c |intf (st|derr, "||
|000029e0| 2d 25 63 22 2c 20 6c 6f | 6e 67 5f 6f 70 74 69 6f |-%c", lo|ng_optio|
|000029f0| 6e 73 5b 69 5d 2e 76 61 | 6c 29 3b 0a 20 20 20 20 |ns[i].va|l);. |
|00002a00| 20 20 69 66 20 28 6c 6f | 6e 67 5f 6f 70 74 69 6f | if (lo|ng_optio|
|00002a10| 6e 73 5b 69 5d 2e 68 61 | 73 5f 61 72 67 20 3d 3d |ns[i].ha|s_arg ==|
|00002a20| 20 41 52 47 5f 52 45 51 | 55 49 52 45 44 29 0a 09 | ARG_REQ|UIRED)..|
|00002a30| 66 70 72 69 6e 74 66 20 | 28 73 74 64 65 72 72 2c |fprintf |(stderr,|
|00002a40| 20 22 20 61 72 67 5d 22 | 29 3b 0a 20 20 20 20 20 | " arg]"|);. |
|00002a50| 20 65 6c 73 65 0a 09 66 | 70 72 69 6e 74 66 20 28 | else..f|printf (|
|00002a60| 73 74 64 65 72 72 2c 20 | 22 5d 22 29 3b 0a 20 20 |stderr, |"]");. |
|00002a70| 20 20 7d 0a 7d 0a 0a 0c | 0a 69 6e 74 0a 6d 61 69 | }.}...|.int.mai|
|00002a80| 6e 20 28 61 72 67 63 2c | 20 61 72 67 76 29 0a 20 |n (argc,| argv). |
|00002a90| 20 20 20 20 69 6e 74 20 | 61 72 67 63 3b 0a 20 20 | int |argc;. |
|00002aa0| 20 20 20 63 68 61 72 20 | 2a 61 72 67 76 5b 5d 3b | char |*argv[];|
|00002ab0| 0a 7b 0a 20 20 69 6e 74 | 20 6f 70 74 69 6f 6e 3b |.{. int| option;|
|00002ac0| 0a 20 20 69 6e 74 20 6f | 70 74 5f 69 6e 64 65 78 |. int o|pt_index|
|00002ad0| 3b 0a 20 20 69 6e 74 20 | 65 72 72 63 6e 74 3b 09 |;. int |errcnt;.|
|00002ae0| 09 09 2f 2a 20 65 72 72 | 6f 72 73 20 65 6e 63 6f |../* err|ors enco|
|00002af0| 75 6e 74 65 72 65 64 20 | 2a 2f 0a 20 20 69 6e 74 |untered |*/. int|
|00002b00| 20 73 68 6f 77 5f 76 65 | 72 73 69 6f 6e 20 3d 20 | show_ve|rsion = |
|00002b10| 30 3b 09 09 2f 2a 20 72 | 65 6d 65 6d 62 65 72 20 |0;../* r|emember |
|00002b20| 74 6f 20 73 68 6f 77 20 | 76 65 72 73 69 6f 6e 20 |to show |version |
|00002b30| 6d 65 73 73 61 67 65 20 | 2a 2f 0a 20 20 69 6e 74 |message |*/. int|
|00002b40| 20 73 68 6f 77 5f 75 73 | 61 67 65 20 3d 20 30 3b | show_us|age = 0;|
|00002b50| 09 09 2f 2a 20 72 65 6d | 65 6d 62 65 72 20 77 68 |../* rem|ember wh|
|00002b60| 65 74 68 65 72 20 74 6f | 20 6f 75 74 70 75 74 20 |ether to| output |
|00002b70| 75 73 61 67 65 20 6d 65 | 73 73 61 67 65 2e 20 2a |usage me|ssage. *|
|00002b80| 2f 0a 20 20 69 6e 74 20 | 73 68 6f 77 5f 63 6f 70 |/. int |show_cop|
|00002b90| 79 69 6e 67 20 3d 20 30 | 3b 09 09 2f 2a 20 72 65 |ying = 0|;../* re|
|00002ba0| 6d 65 6d 62 65 72 20 74 | 6f 20 73 68 6f 77 20 63 |member t|o show c|
|00002bb0| 6f 70 79 69 6e 67 20 63 | 6f 6e 64 69 74 69 6f 6e |opying c|ondition|
|00002bc0| 73 20 2a 2f 0a 20 20 69 | 6e 74 20 6e 61 6d 65 64 |s */. i|nt named|
|00002bd0| 5f 69 6e 70 75 74 20 3d | 20 30 3b 09 09 2f 2a 20 |_input =| 0;../* |
|00002be0| 63 6f 75 6e 74 20 6e 61 | 6d 65 64 20 70 6c 6f 74 |count na|med plot|
|00002bf0| 20 66 69 6c 65 73 20 6f | 6e 20 63 6f 6d 6d 61 6e | files o|n comman|
|00002c00| 64 20 6c 69 6e 65 2e 20 | 2a 2f 0a 20 20 63 68 61 |d line. |*/. cha|
|00002c10| 72 20 2a 62 75 66 66 65 | 72 3b 0a 20 20 69 6e 74 |r *buffe|r;. int|
|00002c20| 20 20 62 75 66 66 65 72 | 5f 6c 65 6e 67 74 68 3b | buffer|_length;|
|00002c30| 0a 0a 20 20 70 72 6f 67 | 6e 61 6d 65 20 3d 20 61 |.. prog|name = a|
|00002c40| 72 67 76 5b 30 5d 3b 0a | 20 20 62 75 66 66 65 72 |rgv[0];.| buffer|
|00002c50| 5f 6c 65 6e 67 74 68 20 | 3d 20 31 30 32 34 3b 0a |_length |= 1024;.|
|00002c60| 20 20 62 75 66 66 65 72 | 20 3d 20 28 63 68 61 72 | buffer| = (char|
|00002c70| 20 2a 29 20 6d 61 6c 6c | 6f 63 20 28 62 75 66 66 | *) mall|oc (buff|
|00002c80| 65 72 5f 6c 65 6e 67 74 | 68 29 3b 0a 20 20 69 66 |er_lengt|h);. if|
|00002c90| 20 28 62 75 66 66 65 72 | 20 3c 3d 20 28 63 68 61 | (buffer| <= (cha|
|00002ca0| 72 20 2a 29 20 30 29 0a | 20 20 20 20 7b 0a 20 20 |r *) 0).| {. |
|00002cb0| 20 20 20 20 70 65 72 72 | 6f 72 20 28 22 6d 61 6c | perr|or ("mal|
|00002cc0| 6c 6f 63 20 66 61 69 6c | 65 64 3a 22 29 3b 0a 20 |loc fail|ed:");. |
|00002cd0| 20 20 20 20 20 65 78 69 | 74 20 28 2d 31 29 3b 0a | exi|t (-1);.|
|00002ce0| 20 20 20 20 7d 0a 0a 20 | 20 6f 70 65 6e 70 6c 20 | }.. | openpl |
|00002cf0| 28 29 3b 0a 0a 77 68 69 | 6c 65 20 28 28 6f 70 74 |();..whi|le ((opt|
|00002d00| 69 6f 6e 20 3d 20 67 65 | 74 6f 70 74 5f 6c 6f 6e |ion = ge|topt_lon|
|00002d10| 67 20 28 61 72 67 63 2c | 20 61 72 67 76 2c 20 22 |g (argc,| argv, "|
|00002d20| 2d 43 46 3a 48 56 57 66 | 3a 68 6c 73 75 22 2c 20 |-CF:HVWf|:hlsu", |
|00002d30| 6c 6f 6e 67 5f 6f 70 74 | 69 6f 6e 73 2c 20 26 6f |long_opt|ions, &o|
|00002d40| 70 74 5f 69 6e 64 65 78 | 29 29 20 21 3d 20 45 4f |pt_index|)) != EO|
|00002d50| 46 29 20 7b 0a 20 20 20 | 20 20 20 69 66 20 28 6f |F) {. | if (o|
|00002d60| 70 74 69 6f 6e 20 3d 3d | 20 30 29 0a 09 6f 70 74 |ption ==| 0)..opt|
|00002d70| 69 6f 6e 20 3d 20 6c 6f | 6e 67 5f 6f 70 74 69 6f |ion = lo|ng_optio|
|00002d80| 6e 73 5b 6f 70 74 5f 69 | 6e 64 65 78 5d 2e 76 61 |ns[opt_i|ndex].va|
|00002d90| 6c 3b 0a 0a 20 20 20 20 | 20 20 73 77 69 74 63 68 |l;.. | switch|
|00002da0| 20 28 6f 70 74 69 6f 6e | 29 0a 09 7b 0a 09 63 61 | (option|)..{..ca|
|00002db0| 73 65 20 27 66 27 3a 0a | 09 20 20 2f 2a 20 53 69 |se 'f':.|. /* Si|
|00002dc0| 7a 65 73 20 73 75 70 70 | 6f 72 74 65 64 20 62 79 |zes supp|orted by|
|00002dd0| 20 58 3a 20 38 2c 20 31 | 30 2c 20 31 32 2c 20 31 | X: 8, 1|0, 12, 1|
|00002de0| 34 2c 20 31 38 2c 20 61 | 6e 64 20 32 34 2e 20 2a |4, 18, a|nd 24. *|
|00002df0| 2f 0a 09 20 20 28 76 6f | 69 64 29 20 66 6f 6e 74 |/.. (vo|id) font|
|00002e00| 73 69 7a 65 20 28 61 74 | 6f 69 20 28 6f 70 74 61 |size (at|oi (opta|
|00002e10| 72 67 29 29 3b 0a 09 63 | 61 73 65 20 27 46 27 3a |rg));..c|ase 'F':|
|00002e20| 0a 09 20 20 28 76 6f 69 | 64 29 20 66 6f 6e 74 6e |.. (voi|d) fontn|
|00002e30| 61 6d 65 20 28 6f 70 74 | 61 72 67 29 3b 0a 09 20 |ame (opt|arg);.. |
|00002e40| 20 62 72 65 61 6b 3b 0a | 09 63 61 73 65 20 27 68 | break;.|.case 'h|
|00002e50| 27 3a 09 09 2f 2a 20 72 | 65 61 64 20 68 69 67 68 |':../* r|ead high|
|00002e60| 20 62 79 74 65 20 66 69 | 72 73 74 20 2a 2f 0a 09 | byte fi|rst */..|
|00002e70| 20 20 67 75 65 73 73 5f | 62 79 74 65 5f 6f 72 64 | guess_|byte_ord|
|00002e80| 65 72 20 3d 20 30 3b 0a | 09 20 20 68 69 67 68 5f |er = 0;.|. high_|
|00002e90| 62 79 74 65 5f 66 69 72 | 73 74 20 3d 20 31 3b 0a |byte_fir|st = 1;.|
|00002ea0| 09 20 20 62 72 65 61 6b | 3b 0a 09 63 61 73 65 20 |. break|;..case |
|00002eb0| 27 6c 27 3a 09 09 2f 2a | 20 72 65 61 64 20 6c 6f |'l':../*| read lo|
|00002ec0| 77 20 62 79 74 65 20 66 | 69 72 73 74 20 2a 2f 0a |w byte f|irst */.|
|00002ed0| 09 20 20 67 75 65 73 73 | 5f 62 79 74 65 5f 6f 72 |. guess|_byte_or|
|00002ee0| 64 65 72 20 3d 20 30 3b | 0a 09 20 20 68 69 67 68 |der = 0;|.. high|
|00002ef0| 5f 62 79 74 65 5f 66 69 | 72 73 74 20 3d 20 30 3b |_byte_fi|rst = 0;|
|00002f00| 0a 09 20 20 62 72 65 61 | 6b 3b 0a 09 63 61 73 65 |.. brea|k;..case|
|00002f10| 20 27 73 27 3a 09 09 2f | 2a 20 53 69 67 6e 65 64 | 's':../|* Signed|
|00002f20| 20 2a 2f 0a 09 20 20 73 | 69 67 6e 65 64 5f 69 6e | */.. s|igned_in|
|00002f30| 70 75 74 20 3d 20 31 3b | 0a 09 20 20 62 72 65 61 |put = 1;|.. brea|
|00002f40| 6b 3b 0a 09 63 61 73 65 | 20 27 75 27 3a 09 09 2f |k;..case| 'u':../|
|00002f50| 2a 20 55 6e 73 69 67 6e | 65 64 20 2a 2f 0a 09 20 |* Unsign|ed */.. |
|00002f60| 20 73 69 67 6e 65 64 5f | 69 6e 70 75 74 20 3d 20 | signed_|input = |
|00002f70| 30 3b 0a 09 20 20 62 72 | 65 61 6b 3b 0a 09 63 61 |0;.. br|eak;..ca|
|00002f80| 73 65 20 27 48 27 3a 09 | 09 2f 2a 20 48 65 6c 70 |se 'H':.|./* Help|
|00002f90| 20 2a 2f 0a 09 20 20 73 | 68 6f 77 5f 75 73 61 67 | */.. s|how_usag|
|00002fa0| 65 20 3d 20 31 3b 0a 09 | 20 20 62 72 65 61 6b 3b |e = 1;..| break;|
|00002fb0| 0a 09 63 61 73 65 20 27 | 76 27 3a 0a 09 63 61 73 |..case '|v':..cas|
|00002fc0| 65 20 27 56 27 3a 09 09 | 2f 2a 20 56 65 72 73 69 |e 'V':..|/* Versi|
|00002fd0| 6f 6e 20 2a 2f 0a 09 20 | 20 73 68 6f 77 5f 76 65 |on */.. | show_ve|
|00002fe0| 72 73 69 6f 6e 20 3d 20 | 31 3b 0a 09 20 20 62 72 |rsion = |1;.. br|
|00002ff0| 65 61 6b 3b 0a 09 63 61 | 73 65 20 27 57 27 3a 09 |eak;..ca|se 'W':.|
|00003000| 09 2f 2a 20 57 61 72 72 | 61 6e 74 79 20 2a 2f 0a |./* Warr|anty */.|
|00003010| 09 63 61 73 65 20 27 43 | 27 3a 09 09 2f 2a 20 43 |.case 'C|':../* C|
|00003020| 6f 70 79 69 6e 67 20 2a | 2f 0a 09 20 20 73 68 6f |opying *|/.. sho|
|00003030| 77 5f 63 6f 70 79 69 6e | 67 20 3d 20 31 3b 0a 09 |w_copyin|g = 1;..|
|00003040| 20 20 62 72 65 61 6b 3b | 0a 09 63 61 73 65 20 31 | break;|..case 1|
|00003050| 3a 0a 09 20 20 7b 0a 09 | 20 20 20 20 46 49 4c 45 |:.. {..| FILE|
|00003060| 20 2a 64 61 74 61 5f 66 | 69 6c 65 3b 0a 0a 09 20 | *data_f|ile;... |
|00003070| 20 20 20 69 66 20 28 73 | 74 72 63 6d 70 20 28 6f | if (s|trcmp (o|
|00003080| 70 74 61 72 67 2c 20 22 | 2d 22 29 20 3d 3d 20 30 |ptarg, "|-") == 0|
|00003090| 29 0a 09 20 20 20 20 20 | 20 64 61 74 61 5f 66 69 |).. | data_fi|
|000030a0| 6c 65 20 3d 20 73 74 64 | 69 6e 3b 0a 09 20 20 20 |le = std|in;.. |
|000030b0| 20 65 6c 73 65 0a 09 20 | 20 20 20 20 20 7b 0a 09 | else.. | {..|
|000030c0| 09 64 61 74 61 5f 66 69 | 6c 65 20 3d 20 66 6f 70 |.data_fi|le = fop|
|000030d0| 65 6e 20 28 6f 70 74 61 | 72 67 2c 20 22 72 22 29 |en (opta|rg, "r")|
|000030e0| 3b 0a 09 09 69 66 20 28 | 64 61 74 61 5f 66 69 6c |;...if (|data_fil|
|000030f0| 65 20 3d 3d 20 4e 55 4c | 4c 29 0a 09 09 20 20 7b |e == NUL|L)... {|
|00003100| 0a 09 09 20 20 20 20 28 | 76 6f 69 64 29 20 66 70 |... (|void) fp|
|00003110| 72 69 6e 74 66 20 28 73 | 74 64 65 72 72 2c 20 22 |rintf (s|tderr, "|
|00003120| 25 73 3a 20 20 69 67 6e | 6f 72 69 6e 67 20 6e 6f |%s: ign|oring no|
|00003130| 6e 65 78 69 73 74 65 6e | 74 20 6f 72 20 69 6e 61 |nexisten|t or ina|
|00003140| 63 63 65 73 73 69 62 6c | 65 20 66 69 6c 65 20 60 |ccessibl|e file `|
|00003150| 25 73 27 5c 6e 22 2c 0a | 09 09 09 09 20 20 20 20 |%s'\n",.|.... |
|00003160| 61 72 67 76 5b 30 5d 2c | 20 6f 70 74 61 72 67 29 |argv[0],| optarg)|
|00003170| 3b 0a 09 09 20 20 20 20 | 63 6f 6e 74 69 6e 75 65 |;... |continue|
|00003180| 3b 0a 09 09 20 20 7d 0a | 09 20 20 20 20 20 20 7d |;... }.|. }|
|00003190| 0a 09 20 20 20 20 72 65 | 61 64 5f 70 6c 6f 74 20 |.. re|ad_plot |
|000031a0| 28 64 61 74 61 5f 66 69 | 6c 65 2c 20 62 75 66 66 |(data_fi|le, buff|
|000031b0| 65 72 2c 20 62 75 66 66 | 65 72 5f 6c 65 6e 67 74 |er, buff|er_lengt|
|000031c0| 68 29 3b 0a 09 20 20 20 | 20 6e 61 6d 65 64 5f 69 |h);.. | named_i|
|000031d0| 6e 70 75 74 2b 2b 3b 0a | 0a 09 20 20 20 20 69 66 |nput++;.|.. if|
|000031e0| 20 28 64 61 74 61 5f 66 | 69 6c 65 20 21 3d 20 73 | (data_f|ile != s|
|000031f0| 74 64 69 6e 29 20 2f 2a | 20 44 6f 6e 27 74 20 63 |tdin) /*| Don't c|
|00003200| 6c 6f 73 65 20 73 74 64 | 69 6e 20 2a 2f 0a 09 20 |lose std|in */.. |
|00003210| 20 20 20 20 20 66 63 6c | 6f 73 65 20 28 64 61 74 | fcl|ose (dat|
|00003220| 61 5f 66 69 6c 65 29 3b | 0a 09 20 20 7d 0a 09 20 |a_file);|.. }.. |
|00003230| 20 62 72 65 61 6b 3b 0a | 09 64 65 66 61 75 6c 74 | break;.|.default|
|00003240| 3a 0a 09 20 20 65 72 72 | 63 6e 74 2b 2b 3b 0a 09 |:.. err|cnt++;..|
|00003250| 20 20 62 72 65 61 6b 3b | 0a 09 7d 0a 20 20 20 20 | break;|..}. |
|00003260| 7d 0a 0a 20 20 69 66 20 | 28 73 68 6f 77 5f 76 65 |}.. if |(show_ve|
|00003270| 72 73 69 6f 6e 29 0a 20 | 20 20 20 64 69 73 70 6c |rsion). | displ|
|00003280| 61 79 5f 76 65 72 73 69 | 6f 6e 20 28 29 3b 0a 0a |ay_versi|on ();..|
|00003290| 20 20 69 66 20 28 65 72 | 72 63 6e 74 20 3e 20 30 | if (er|rcnt > 0|
|000032a0| 20 7c 7c 20 73 68 6f 77 | 5f 75 73 61 67 65 29 0a | || show|_usage).|
|000032b0| 20 20 20 20 64 69 73 70 | 6c 61 79 5f 68 65 6c 70 | disp|lay_help|
|000032c0| 20 28 29 3b 0a 0a 20 20 | 69 66 20 28 73 68 6f 77 | ();.. |if (show|
|000032d0| 5f 63 6f 70 79 69 6e 67 | 29 0a 20 20 20 20 7b 0a |_copying|). {.|
|000032e0| 20 20 20 20 20 20 69 6e | 74 20 6b 3b 0a 20 20 20 | in|t k;. |
|000032f0| 20 20 20 69 66 20 28 21 | 73 68 6f 77 5f 76 65 72 | if (!|show_ver|
|00003300| 73 69 6f 6e 29 0a 09 64 | 69 73 70 6c 61 79 5f 76 |sion)..d|isplay_v|
|00003310| 65 72 73 69 6f 6e 20 28 | 29 3b 0a 20 20 20 20 20 |ersion (|);. |
|00003320| 20 66 6f 72 20 28 6b 20 | 3d 20 30 3b 20 63 6f 70 | for (k |= 0; cop|
|00003330| 79 5f 6e 6f 74 69 63 65 | 5b 6b 5d 20 21 3d 20 27 |y_notice|[k] != '|
|00003340| 5c 30 27 3b 20 6b 2b 2b | 29 20 7b 0a 09 28 76 6f |\0'; k++|) {..(vo|
|00003350| 69 64 29 20 66 70 75 74 | 73 20 28 63 6f 70 79 5f |id) fput|s (copy_|
|00003360| 6e 6f 74 69 63 65 5b 6b | 5d 2c 20 73 74 64 65 72 |notice[k|], stder|
|00003370| 72 29 3b 0a 20 20 20 20 | 20 20 7d 0a 20 20 20 20 |r);. | }. |
|00003380| 20 20 63 6c 6f 73 65 70 | 6c 20 28 29 3b 0a 20 20 | closep|l ();. |
|00003390| 20 20 20 20 65 78 69 74 | 20 28 30 29 3b 0a 20 20 | exit| (0);. |
|000033a0| 20 20 7d 0a 0a 20 20 69 | 66 20 28 65 72 72 63 6e | }.. i|f (errcn|
|000033b0| 74 20 3e 20 30 20 7c 7c | 20 73 68 6f 77 5f 75 73 |t > 0 ||| show_us|
|000033c0| 61 67 65 29 0a 20 20 20 | 20 7b 0a 20 20 20 20 20 |age). | {. |
|000033d0| 20 63 6c 6f 73 65 70 6c | 20 28 29 3b 0a 20 20 20 | closepl| ();. |
|000033e0| 20 20 20 65 78 69 74 20 | 28 65 72 72 63 6e 74 20 | exit |(errcnt |
|000033f0| 3e 20 30 20 3f 20 31 20 | 3a 20 30 29 3b 0a 20 20 |> 0 ? 1 |: 0);. |
|00003400| 20 20 7d 0a 0a 0a 20 20 | 69 66 20 28 6f 70 74 69 | }... |if (opti|
|00003410| 6e 64 20 3c 20 61 72 67 | 63 29 0a 20 20 20 20 7b |nd < arg|c). {|
|00003420| 0a 20 20 20 20 20 20 66 | 6f 72 20 28 3b 20 6f 70 |. f|or (; op|
|00003430| 74 69 6e 64 20 3c 20 61 | 72 67 63 3b 20 6f 70 74 |tind < a|rgc; opt|
|00003440| 69 6e 64 2b 2b 29 0a 09 | 7b 0a 09 20 20 46 49 4c |ind++)..|{.. FIL|
|00003450| 45 20 2a 64 61 74 61 5f | 66 69 6c 65 3b 0a 0a 09 |E *data_|file;...|
|00003460| 20 20 69 66 20 28 73 74 | 72 63 6d 70 20 28 61 72 | if (st|rcmp (ar|
|00003470| 67 76 5b 6f 70 74 69 6e | 64 5d 2c 20 22 2d 22 29 |gv[optin|d], "-")|
|00003480| 20 3d 3d 20 30 29 0a 09 | 20 20 20 20 64 61 74 61 | == 0)..| data|
|00003490| 5f 66 69 6c 65 20 3d 20 | 73 74 64 69 6e 3b 0a 09 |_file = |stdin;..|
|000034a0| 20 20 65 6c 73 65 0a 09 | 20 20 20 20 7b 0a 09 20 | else..| {.. |
|000034b0| 20 20 20 20 20 64 61 74 | 61 5f 66 69 6c 65 20 3d | dat|a_file =|
|000034c0| 20 66 6f 70 65 6e 20 28 | 61 72 67 76 5b 6f 70 74 | fopen (|argv[opt|
|000034d0| 69 6e 64 5d 2c 20 22 72 | 22 29 3b 0a 09 20 20 20 |ind], "r|");.. |
|000034e0| 20 20 20 69 66 20 28 64 | 61 74 61 5f 66 69 6c 65 | if (d|ata_file|
|000034f0| 20 3d 3d 20 4e 55 4c 4c | 29 0a 09 09 7b 0a 09 09 | == NULL|)...{...|
|00003500| 20 20 28 76 6f 69 64 29 | 20 66 70 72 69 6e 74 66 | (void)| fprintf|
|00003510| 20 28 73 74 64 65 72 72 | 2c 20 22 25 73 3a 20 20 | (stderr|, "%s: |
|00003520| 69 67 6e 6f 72 69 6e 67 | 20 6e 6f 6e 65 78 69 73 |ignoring| nonexis|
|00003530| 74 65 6e 74 20 6f 72 20 | 69 6e 61 63 63 65 73 73 |tent or |inaccess|
|00003540| 69 62 6c 65 20 66 69 6c | 65 20 60 25 73 27 5c 6e |ible fil|e `%s'\n|
|00003550| 22 2c 0a 09 09 09 09 20 | 20 61 72 67 76 5b 30 5d |",..... | argv[0]|
|00003560| 2c 20 61 72 67 76 5b 6f | 70 74 69 6e 64 5d 29 3b |, argv[o|ptind]);|
|00003570| 0a 09 09 20 20 63 6f 6e | 74 69 6e 75 65 3b 0a 09 |... con|tinue;..|
|00003580| 09 7d 0a 09 20 20 20 20 | 7d 0a 09 20 20 6e 61 6d |.}.. |}.. nam|
|00003590| 65 64 5f 69 6e 70 75 74 | 2b 2b 3b 0a 09 20 20 72 |ed_input|++;.. r|
|000035a0| 65 61 64 5f 70 6c 6f 74 | 20 28 73 74 64 69 6e 2c |ead_plot| (stdin,|
|000035b0| 20 62 75 66 66 65 72 2c | 20 62 75 66 66 65 72 5f | buffer,| buffer_|
|000035c0| 6c 65 6e 67 74 68 29 3b | 0a 0a 09 20 20 69 66 20 |length);|... if |
|000035d0| 28 64 61 74 61 5f 66 69 | 6c 65 20 21 3d 20 73 74 |(data_fi|le != st|
|000035e0| 64 69 6e 29 20 2f 2a 20 | 44 6f 6e 27 74 20 63 6c |din) /* |Don't cl|
|000035f0| 6f 73 65 20 73 74 64 69 | 6e 20 2a 2f 0a 09 20 20 |ose stdi|n */.. |
|00003600| 20 20 66 63 6c 6f 73 65 | 20 28 64 61 74 61 5f 66 | fclose| (data_f|
|00003610| 69 6c 65 29 3b 0a 09 7d | 0a 20 20 20 20 7d 20 2f |ile);..}|. } /|
|00003620| 2a 20 65 6e 64 66 6f 72 | 20 2a 2f 0a 0a 20 20 69 |* endfor| */.. i|
|00003630| 66 20 28 21 6e 61 6d 65 | 64 5f 69 6e 70 75 74 29 |f (!name|d_input)|
|00003640| 0a 20 20 20 20 2f 2a 20 | 52 65 61 64 20 73 74 64 |. /* |Read std|
|00003650| 69 6e 20 69 66 20 6e 6f | 20 66 69 6c 65 73 20 77 |in if no| files w|
|00003660| 65 72 65 20 6e 61 6d 65 | 64 20 6f 6e 20 74 68 65 |ere name|d on the|
|00003670| 20 63 6f 6d 6d 61 6e 64 | 20 6c 69 6e 65 2e 20 2a | command| line. *|
|00003680| 2f 0a 20 20 20 20 72 65 | 61 64 5f 70 6c 6f 74 20 |/. re|ad_plot |
|00003690| 28 73 74 64 69 6e 2c 20 | 62 75 66 66 65 72 2c 20 |(stdin, |buffer, |
|000036a0| 62 75 66 66 65 72 5f 6c | 65 6e 67 74 68 29 3b 0a |buffer_l|ength);.|
|000036b0| 0a 20 20 63 6c 6f 73 65 | 70 6c 20 28 29 3b 0a 20 |. close|pl ();. |
|000036c0| 20 72 65 74 75 72 6e 20 | 30 3b 0a 7d 0a 00 00 00 | return |0;.}....|
|000036d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000036e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000036f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003700| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003710| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003720| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003780| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000037a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000037b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000037c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000037d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000037e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000037f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003800| 67 72 61 70 68 69 63 73 | 2d 30 2e 31 37 2f 70 6c |graphics|-0.17/pl|
|00003810| 6f 74 32 66 69 67 2f 6c | 69 6e 65 6d 6f 64 2e 63 |ot2fig/l|inemod.c|
|00003820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003860| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 33 37 37 |.... 6|44 . 377|
|00003870| 35 35 20 00 20 20 20 31 | 33 32 20 00 20 20 20 20 |55 . 1|32 . |
|00003880| 20 20 20 34 32 33 37 20 | 20 34 37 36 37 30 36 31 | 4237 | 4767061|
|00003890| 37 32 33 20 20 31 34 30 | 34 31 00 20 30 00 00 00 |723 140|41. 0...|
|000038a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000038b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000038c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000038d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000038e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000038f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003900| 00 75 73 74 61 72 20 20 | 00 72 69 63 68 00 00 00 |.ustar |.rich...|
|00003910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003920| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003a00| 2f 2a 20 70 6c 6f 74 2c | 20 75 6e 69 78 20 70 6c |/* plot,| unix pl|
|00003a10| 6f 74 20 66 69 6c 65 20 | 74 6f 20 67 72 61 70 68 |ot file |to graph|
|00003a20| 69 63 73 20 64 65 76 69 | 63 65 20 74 72 61 6e 73 |ics devi|ce trans|
|00003a30| 6c 61 74 6f 72 73 2e 0a | 20 20 20 43 6f 70 79 72 |lators..| Copyr|
|00003a40| 69 67 68 74 20 28 43 29 | 20 31 39 38 39 20 46 72 |ight (C)| 1989 Fr|
|00003a50| 65 65 20 53 6f 66 74 77 | 61 72 65 20 46 6f 75 6e |ee Softw|are Foun|
|00003a60| 64 61 74 69 6f 6e 2c 20 | 49 6e 63 2e 0a 0a 20 20 |dation, |Inc... |
|00003a70| 20 70 6c 6f 74 20 69 73 | 20 64 69 73 74 72 69 62 | plot is| distrib|
|00003a80| 75 74 65 64 20 69 6e 20 | 74 68 65 20 68 6f 70 65 |uted in |the hope|
|00003a90| 20 74 68 61 74 20 69 74 | 20 77 69 6c 6c 20 62 65 | that it| will be|
|00003aa0| 20 75 73 65 66 75 6c 2c | 20 62 75 74 20 57 49 54 | useful,| but WIT|
|00003ab0| 48 4f 55 54 0a 20 20 20 | 41 4e 59 20 57 41 52 52 |HOUT. |ANY WARR|
|00003ac0| 41 4e 54 59 2e 20 20 4e | 6f 20 61 75 74 68 6f 72 |ANTY. N|o author|
|00003ad0| 20 6f 72 20 64 69 73 74 | 72 69 62 75 74 6f 72 20 | or dist|ributor |
|00003ae0| 61 63 63 65 70 74 73 20 | 72 65 73 70 6f 6e 73 69 |accepts |responsi|
|00003af0| 62 69 6c 69 74 79 20 74 | 6f 0a 20 20 20 61 6e 79 |bility t|o. any|
|00003b00| 6f 6e 65 20 66 6f 72 20 | 74 68 65 20 63 6f 6e 73 |one for |the cons|
|00003b10| 65 71 75 65 6e 63 65 73 | 20 6f 66 20 75 73 69 6e |equences| of usin|
|00003b20| 67 20 69 74 20 6f 72 20 | 66 6f 72 20 77 68 65 74 |g it or |for whet|
|00003b30| 68 65 72 20 69 74 20 73 | 65 72 76 65 73 20 61 6e |her it s|erves an|
|00003b40| 79 0a 20 20 20 70 61 72 | 74 69 63 75 6c 61 72 20 |y. par|ticular |
|00003b50| 70 75 72 70 6f 73 65 20 | 6f 72 20 77 6f 72 6b 73 |purpose |or works|
|00003b60| 20 61 74 20 61 6c 6c 2c | 20 75 6e 6c 65 73 73 20 | at all,| unless |
|00003b70| 68 65 20 73 61 79 73 20 | 73 6f 20 69 6e 20 77 72 |he says |so in wr|
|00003b80| 69 74 69 6e 67 2e 0a 20 | 20 20 52 65 66 65 72 20 |iting.. | Refer |
|00003b90| 74 6f 20 74 68 65 20 47 | 4e 55 20 47 65 6e 65 72 |to the G|NU Gener|
|00003ba0| 61 6c 20 50 75 62 6c 69 | 63 20 4c 69 63 65 6e 73 |al Publi|c Licens|
|00003bb0| 65 20 66 6f 72 20 66 75 | 6c 6c 20 64 65 74 61 69 |e for fu|ll detai|
|00003bc0| 6c 73 2e 0a 20 20 20 0a | 20 20 20 45 76 65 72 79 |ls.. .| Every|
|00003bd0| 6f 6e 65 20 69 73 20 67 | 72 61 6e 74 65 64 20 70 |one is g|ranted p|
|00003be0| 65 72 6d 69 73 73 69 6f | 6e 20 74 6f 20 63 6f 70 |ermissio|n to cop|
|00003bf0| 79 2c 20 6d 6f 64 69 66 | 79 20 61 6e 64 20 72 65 |y, modif|y and re|
|00003c00| 64 69 73 74 72 69 62 75 | 74 65 20 70 6c 6f 74 2c |distribu|te plot,|
|00003c10| 0a 20 20 20 62 75 74 20 | 6f 6e 6c 79 20 75 6e 64 |. but |only und|
|00003c20| 65 72 20 74 68 65 20 63 | 6f 6e 64 69 74 69 6f 6e |er the c|ondition|
|00003c30| 73 20 64 65 73 63 72 69 | 62 65 64 20 69 6e 20 74 |s descri|bed in t|
|00003c40| 68 65 20 47 4e 55 20 47 | 65 6e 65 72 61 6c 20 50 |he GNU G|eneral P|
|00003c50| 75 62 6c 69 63 0a 20 20 | 20 4c 69 63 65 6e 73 65 |ublic. | License|
|00003c60| 2e 20 20 41 20 63 6f 70 | 79 20 6f 66 20 74 68 69 |. A cop|y of thi|
|00003c70| 73 20 6c 69 63 65 6e 73 | 65 20 69 73 20 73 75 70 |s licens|e is sup|
|00003c80| 70 6f 73 65 64 20 74 6f | 20 68 61 76 65 20 62 65 |posed to| have be|
|00003c90| 65 6e 20 67 69 76 65 6e | 20 74 6f 20 79 6f 75 0a |en given| to you.|
|00003ca0| 20 20 20 61 6c 6f 6e 67 | 20 77 69 74 68 20 70 6c | along| with pl|
|00003cb0| 6f 74 20 73 6f 20 79 6f | 75 20 63 61 6e 20 6b 6e |ot so yo|u can kn|
|00003cc0| 6f 77 20 79 6f 75 72 20 | 72 69 67 68 74 73 20 61 |ow your |rights a|
|00003cd0| 6e 64 20 72 65 73 70 6f | 6e 73 69 62 69 6c 69 74 |nd respo|nsibilit|
|00003ce0| 69 65 73 2e 20 20 49 74 | 0a 20 20 20 73 68 6f 75 |ies. It|. shou|
|00003cf0| 6c 64 20 62 65 20 69 6e | 20 61 20 66 69 6c 65 20 |ld be in| a file |
|00003d00| 6e 61 6d 65 64 20 43 4f | 50 59 49 4e 47 2e 20 20 |named CO|PYING. |
|00003d10| 41 6d 6f 6e 67 20 6f 74 | 68 65 72 20 74 68 69 6e |Among ot|her thin|
|00003d20| 67 73 2c 20 74 68 65 20 | 63 6f 70 79 72 69 67 68 |gs, the |copyrigh|
|00003d30| 74 0a 20 20 20 6e 6f 74 | 69 63 65 20 61 6e 64 20 |t. not|ice and |
|00003d40| 74 68 69 73 20 6e 6f 74 | 69 63 65 20 6d 75 73 74 |this not|ice must|
|00003d50| 20 62 65 20 70 72 65 73 | 65 72 76 65 64 20 6f 6e | be pres|erved on|
|00003d60| 20 61 6c 6c 20 63 6f 70 | 69 65 73 2e 20 20 2a 2f | all cop|ies. */|
|00003d70| 0a 0a 0a 2f 2a 20 54 68 | 69 73 20 66 69 6c 65 20 |.../* Th|is file |
|00003d80| 69 73 20 74 68 65 20 6c | 69 6e 65 6d 6f 64 20 72 |is the l|inemod r|
|00003d90| 6f 75 74 69 6e 65 2c 20 | 77 68 69 63 68 20 69 73 |outine, |which is|
|00003da0| 20 61 20 73 74 61 6e 64 | 61 72 64 20 70 61 72 74 | a stand|ard part|
|00003db0| 20 6f 66 20 74 68 65 20 | 70 6c 6f 74 0a 20 20 20 | of the |plot. |
|00003dc0| 6c 69 62 72 61 72 79 2e | 20 20 49 74 20 73 65 74 |library.| It set|
|00003dd0| 73 20 74 68 65 20 6c 69 | 6e 65 20 74 79 70 65 20 |s the li|ne type |
|00003de0| 61 63 63 6f 72 64 69 6e | 67 20 74 6f 20 74 68 65 |accordin|g to the|
|00003df0| 20 6e 61 6d 65 20 63 6f | 6e 74 61 69 6e 65 64 20 | name co|ntained |
|00003e00| 69 6e 0a 20 20 20 74 68 | 65 20 73 74 72 69 6e 67 |in. th|e string|
|00003e10| 20 61 72 67 75 6d 65 6e | 74 20 73 20 2a 2f 0a 0a | argumen|t s */..|
|00003e20| 23 69 6e 63 6c 75 64 65 | 20 22 73 79 73 2d 64 65 |#include| "sys-de|
|00003e30| 66 69 6e 65 73 2e 68 22 | 0a 23 69 6e 63 6c 75 64 |fines.h"|.#includ|
|00003e40| 65 20 22 6c 69 62 70 6c | 6f 74 2e 68 22 0a 23 69 |e "libpl|ot.h".#i|
|00003e50| 6e 63 6c 75 64 65 20 22 | 65 78 74 65 72 6e 2e 68 |nclude "|extern.h|
|00003e60| 22 0a 0a 69 6e 74 20 6c | 69 6e 65 5f 73 74 79 6c |"..int l|ine_styl|
|00003e70| 65 20 3d 20 30 3b 20 2f | 2a 20 73 6f 6c 69 64 20 |e = 0; /|* solid |
|00003e80| 2a 2f 0a 0a 64 6f 75 62 | 6c 65 20 64 61 73 68 5f |*/..doub|le dash_|
|00003e90| 6c 65 6e 67 74 68 20 3d | 20 31 30 2e 30 3b 20 2f |length =| 10.0; /|
|00003ea0| 2a 20 73 68 6f 72 74 20 | 64 61 73 68 65 64 20 2a |* short |dashed *|
|00003eb0| 2f 0a 0a 69 6e 74 0a 6c | 69 6e 65 6d 6f 64 20 28 |/..int.l|inemod (|
|00003ec0| 73 29 0a 20 20 20 20 20 | 63 68 61 72 20 2a 73 3b |s). |char *s;|
|00003ed0| 0a 7b 0a 20 20 69 66 20 | 28 28 73 74 72 63 6d 70 |.{. if |((strcmp|
|00003ee0| 28 20 73 2c 20 22 6c 6f | 6e 67 64 61 73 68 65 64 |( s, "lo|ngdashed|
|00003ef0| 22 29 20 3d 3d 20 30 29 | 0a 20 20 20 20 20 20 7c |") == 0)|. ||
|00003f00| 7c 20 28 73 74 72 63 6d | 70 28 20 73 2c 20 22 6c || (strcm|p( s, "l|
|00003f10| 6f 6e 67 2d 64 61 73 68 | 65 64 22 29 20 3d 3d 20 |ong-dash|ed") == |
|00003f20| 30 29 29 0a 20 20 20 20 | 7b 0a 20 20 20 20 20 20 |0)). |{. |
|00003f30| 6c 69 6e 65 5f 73 74 79 | 6c 65 20 3d 20 31 3b 0a |line_sty|le = 1;.|
|00003f40| 20 20 20 20 20 20 64 61 | 73 68 5f 6c 65 6e 67 74 | da|sh_lengt|
|00003f50| 68 20 3d 20 32 30 2e 30 | 3b 0a 20 20 20 20 7d 0a |h = 20.0|;. }.|
|00003f60| 20 20 65 6c 73 65 20 69 | 66 20 28 73 74 72 63 6d | else i|f (strcm|
|00003f70| 70 28 20 73 2c 20 22 64 | 69 73 63 6f 6e 6e 65 63 |p( s, "d|isconnec|
|00003f80| 74 65 64 22 29 20 3d 3d | 20 30 29 0a 20 20 20 20 |ted") ==| 0). |
|00003f90| 7b 0a 20 20 20 20 20 20 | 6c 69 6e 65 5f 73 74 79 |{. |line_sty|
|00003fa0| 6c 65 20 3d 20 32 3b 0a | 20 20 20 20 20 20 64 61 |le = 2;.| da|
|00003fb0| 73 68 5f 6c 65 6e 67 74 | 68 20 3d 20 39 39 39 2e |sh_lengt|h = 999.|
|00003fc0| 30 3b 0a 20 20 20 20 7d | 0a 20 20 65 6c 73 65 20 |0;. }|. else |
|00003fd0| 69 66 20 28 28 73 74 72 | 63 6d 70 28 20 73 2c 20 |if ((str|cmp( s, |
|00003fe0| 22 64 6f 74 64 61 73 68 | 65 64 22 29 20 3d 3d 20 |"dotdash|ed") == |
|00003ff0| 30 29 0a 09 20 20 20 7c | 7c 20 28 73 74 72 63 6d |0).. ||| (strcm|
|00004000| 70 28 20 73 2c 20 22 64 | 6f 74 2d 64 61 73 68 65 |p( s, "d|ot-dashe|
|00004010| 64 22 29 20 3d 3d 20 30 | 29 29 0a 20 20 20 20 7b |d") == 0|)). {|
|00004020| 0a 20 20 20 20 20 20 6c | 69 6e 65 5f 73 74 79 6c |. l|ine_styl|
|00004030| 65 20 3d 20 31 3b 0a 20 | 20 20 20 20 20 64 61 73 |e = 1;. | das|
|00004040| 68 5f 6c 65 6e 67 74 68 | 20 3d 20 34 2e 30 3b 0a |h_length| = 4.0;.|
|00004050| 20 20 20 20 7d 0a 20 20 | 65 6c 73 65 20 69 66 20 | }. |else if |
|00004060| 28 73 74 72 63 6d 70 28 | 20 73 2c 20 22 64 6f 74 |(strcmp(| s, "dot|
|00004070| 74 65 64 22 29 20 3d 3d | 20 30 29 0a 20 20 20 20 |ted") ==| 0). |
|00004080| 7b 0a 20 20 20 20 20 20 | 6c 69 6e 65 5f 73 74 79 |{. |line_sty|
|00004090| 6c 65 20 3d 20 32 3b 0a | 20 20 20 20 20 20 64 61 |le = 2;.| da|
|000040a0| 73 68 5f 6c 65 6e 67 74 | 68 20 3d 20 32 2e 30 3b |sh_lengt|h = 2.0;|
|000040b0| 0a 20 20 20 20 7d 0a 20 | 20 65 6c 73 65 20 69 66 |. }. | else if|
|000040c0| 20 28 73 74 72 63 6d 70 | 28 20 73 2c 20 22 73 6f | (strcmp|( s, "so|
|000040d0| 6c 69 64 22 29 20 3d 3d | 20 30 29 0a 20 20 20 20 |lid") ==| 0). |
|000040e0| 7b 0a 20 20 20 20 20 20 | 6c 69 6e 65 5f 73 74 79 |{. |line_sty|
|000040f0| 6c 65 20 3d 20 30 3b 0a | 20 20 20 20 20 20 64 61 |le = 0;.| da|
|00004100| 73 68 5f 6c 65 6e 67 74 | 68 20 3d 20 31 2e 30 3b |sh_lengt|h = 1.0;|
|00004110| 0a 20 20 20 20 7d 0a 20 | 20 65 6c 73 65 20 69 66 |. }. | else if|
|00004120| 20 28 28 73 74 72 63 6d | 70 28 20 73 2c 20 22 73 | ((strcm|p( s, "s|
|00004130| 68 6f 72 74 64 61 73 68 | 65 64 22 29 20 3d 3d 20 |hortdash|ed") == |
|00004140| 30 29 0a 09 20 20 20 7c | 7c 20 28 73 74 72 63 6d |0).. ||| (strcm|
|00004150| 70 28 20 73 2c 20 22 73 | 68 6f 72 74 2d 64 61 73 |p( s, "s|hort-das|
|00004160| 68 65 64 22 29 20 3d 3d | 20 30 29 29 0a 20 20 20 |hed") ==| 0)). |
|00004170| 20 7b 0a 20 20 20 20 20 | 20 6c 69 6e 65 5f 73 74 | {. | line_st|
|00004180| 79 6c 65 20 3d 20 31 3b | 0a 20 20 20 20 20 20 64 |yle = 1;|. d|
|00004190| 61 73 68 5f 6c 65 6e 67 | 74 68 20 3d 20 31 30 2e |ash_leng|th = 10.|
|000041a0| 30 3b 0a 20 20 20 20 7d | 0a 20 20 65 6c 73 65 0a |0;. }|. else.|
|000041b0| 20 20 20 20 7b 0a 20 20 | 20 20 20 20 66 70 72 69 | {. | fpri|
|000041c0| 6e 74 66 28 20 73 74 64 | 65 72 72 2c 20 22 55 6e |ntf( std|err, "Un|
|000041d0| 72 65 63 6f 67 6e 69 7a | 65 64 20 6c 69 6e 65 20 |recogniz|ed line |
|000041e0| 6d 6f 64 65 20 60 25 73 | 27 20 69 67 6e 6f 72 65 |mode `%s|' ignore|
|000041f0| 64 2e 20 55 73 69 6e 67 | 20 73 6f 6c 69 64 2e 5c |d. Using| solid.\|
|00004200| 6e 22 2c 20 73 29 3b 09 | 20 20 20 20 20 20 0a 20 |n", s);.| . |
|00004210| 20 20 20 20 20 2f 2a 20 | 53 65 74 20 74 68 65 20 | /* |Set the |
|00004220| 6c 69 6e 65 20 6d 6f 64 | 65 20 74 6f 20 53 4f 4c |line mod|e to SOL|
|00004230| 49 44 20 69 66 20 61 6e | 20 75 6e 73 75 70 70 6f |ID if an| unsuppo|
|00004240| 72 74 65 64 20 6d 6f 64 | 65 20 69 73 20 72 65 71 |rted mod|e is req|
|00004250| 75 65 73 74 65 64 2e 20 | 2a 2f 0a 20 20 20 20 20 |uested. |*/. |
|00004260| 20 6c 69 6e 65 5f 73 74 | 79 6c 65 20 3d 20 30 3b | line_st|yle = 0;|
|00004270| 0a 20 20 20 20 20 20 64 | 61 73 68 5f 6c 65 6e 67 |. d|ash_leng|
|00004280| 74 68 20 3d 20 31 2e 30 | 3b 0a 20 20 20 20 7d 0a |th = 1.0|;. }.|
|00004290| 0a 20 20 72 65 74 75 72 | 6e 20 30 3b 0a 7d 0a 00 |. retur|n 0;.}..|
|000042a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000042b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000042c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000042d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000042e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000042f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000043a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000043b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000043c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000043d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000043e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000043f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004400| 67 72 61 70 68 69 63 73 | 2d 30 2e 31 37 2f 70 6c |graphics|-0.17/pl|
|00004410| 6f 74 32 66 69 67 2f 61 | 6c 61 62 65 6c 2e 63 00 |ot2fig/a|label.c.|
|00004420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004460| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 33 37 37 |.... 6|44 . 377|
|00004470| 35 35 20 00 20 20 20 31 | 33 32 20 00 20 20 20 20 |55 . 1|32 . |
|00004480| 20 20 20 35 33 35 32 20 | 20 34 37 36 37 30 36 31 | 5352 | 4767061|
|00004490| 33 35 33 20 20 31 33 36 | 33 30 00 20 30 00 00 00 |353 136|30. 0...|
|000044a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000044f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004500| 00 75 73 74 61 72 20 20 | 00 72 69 63 68 00 00 00 |.ustar |.rich...|
|00004510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004520| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000045f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004600| 2f 2a 20 70 6c 6f 74 2c | 20 75 6e 69 78 20 70 6c |/* plot,| unix pl|
|00004610| 6f 74 20 66 69 6c 65 20 | 74 6f 20 67 72 61 70 68 |ot file |to graph|
|00004620| 69 63 73 20 64 65 76 69 | 63 65 20 74 72 61 6e 73 |ics devi|ce trans|
|00004630| 6c 61 74 6f 72 73 2e 0a | 20 20 20 43 6f 70 79 72 |lators..| Copyr|
|00004640| 69 67 68 74 20 28 43 29 | 20 31 39 38 39 20 46 72 |ight (C)| 1989 Fr|
|00004650| 65 65 20 53 6f 66 74 77 | 61 72 65 20 46 6f 75 6e |ee Softw|are Foun|
|00004660| 64 61 74 69 6f 6e 2c 20 | 49 6e 63 2e 0a 0a 20 20 |dation, |Inc... |
|00004670| 20 70 6c 6f 74 20 69 73 | 20 64 69 73 74 72 69 62 | plot is| distrib|
|00004680| 75 74 65 64 20 69 6e 20 | 74 68 65 20 68 6f 70 65 |uted in |the hope|
|00004690| 20 74 68 61 74 20 69 74 | 20 77 69 6c 6c 20 62 65 | that it| will be|
|000046a0| 20 75 73 65 66 75 6c 2c | 20 62 75 74 20 57 49 54 | useful,| but WIT|
|000046b0| 48 4f 55 54 0a 20 20 20 | 41 4e 59 20 57 41 52 52 |HOUT. |ANY WARR|
|000046c0| 41 4e 54 59 2e 20 20 4e | 6f 20 61 75 74 68 6f 72 |ANTY. N|o author|
|000046d0| 20 6f 72 20 64 69 73 74 | 72 69 62 75 74 6f 72 20 | or dist|ributor |
|000046e0| 61 63 63 65 70 74 73 20 | 72 65 73 70 6f 6e 73 69 |accepts |responsi|
|000046f0| 62 69 6c 69 74 79 20 74 | 6f 0a 20 20 20 61 6e 79 |bility t|o. any|
|00004700| 6f 6e 65 20 66 6f 72 20 | 74 68 65 20 63 6f 6e 73 |one for |the cons|
|00004710| 65 71 75 65 6e 63 65 73 | 20 6f 66 20 75 73 69 6e |equences| of usin|
|00004720| 67 20 69 74 20 6f 72 20 | 66 6f 72 20 77 68 65 74 |g it or |for whet|
|00004730| 68 65 72 20 69 74 20 73 | 65 72 76 65 73 20 61 6e |her it s|erves an|
|00004740| 79 0a 20 20 20 70 61 72 | 74 69 63 75 6c 61 72 20 |y. par|ticular |
|00004750| 70 75 72 70 6f 73 65 20 | 6f 72 20 77 6f 72 6b 73 |purpose |or works|
|00004760| 20 61 74 20 61 6c 6c 2c | 20 75 6e 6c 65 73 73 20 | at all,| unless |
|00004770| 68 65 20 73 61 79 73 20 | 73 6f 20 69 6e 20 77 72 |he says |so in wr|
|00004780| 69 74 69 6e 67 2e 0a 20 | 20 20 52 65 66 65 72 20 |iting.. | Refer |
|00004790| 74 6f 20 74 68 65 20 47 | 4e 55 20 47 65 6e 65 72 |to the G|NU Gener|
|000047a0| 61 6c 20 50 75 62 6c 69 | 63 20 4c 69 63 65 6e 73 |al Publi|c Licens|
|000047b0| 65 20 66 6f 72 20 66 75 | 6c 6c 20 64 65 74 61 69 |e for fu|ll detai|
|000047c0| 6c 73 2e 0a 20 20 20 0a | 20 20 20 45 76 65 72 79 |ls.. .| Every|
|000047d0| 6f 6e 65 20 69 73 20 67 | 72 61 6e 74 65 64 20 70 |one is g|ranted p|
|000047e0| 65 72 6d 69 73 73 69 6f | 6e 20 74 6f 20 63 6f 70 |ermissio|n to cop|
|000047f0| 79 2c 20 6d 6f 64 69 66 | 79 20 61 6e 64 20 72 65 |y, modif|y and re|
|00004800| 64 69 73 74 72 69 62 75 | 74 65 20 70 6c 6f 74 2c |distribu|te plot,|
|00004810| 0a 20 20 20 62 75 74 20 | 6f 6e 6c 79 20 75 6e 64 |. but |only und|
|00004820| 65 72 20 74 68 65 20 63 | 6f 6e 64 69 74 69 6f 6e |er the c|ondition|
|00004830| 73 20 64 65 73 63 72 69 | 62 65 64 20 69 6e 20 74 |s descri|bed in t|
|00004840| 68 65 20 47 4e 55 20 47 | 65 6e 65 72 61 6c 20 50 |he GNU G|eneral P|
|00004850| 75 62 6c 69 63 0a 20 20 | 20 4c 69 63 65 6e 73 65 |ublic. | License|
|00004860| 2e 20 20 41 20 63 6f 70 | 79 20 6f 66 20 74 68 69 |. A cop|y of thi|
|00004870| 73 20 6c 69 63 65 6e 73 | 65 20 69 73 20 73 75 70 |s licens|e is sup|
|00004880| 70 6f 73 65 64 20 74 6f | 20 68 61 76 65 20 62 65 |posed to| have be|
|00004890| 65 6e 20 67 69 76 65 6e | 20 74 6f 20 79 6f 75 0a |en given| to you.|
|000048a0| 20 20 20 61 6c 6f 6e 67 | 20 77 69 74 68 20 70 6c | along| with pl|
|000048b0| 6f 74 20 73 6f 20 79 6f | 75 20 63 61 6e 20 6b 6e |ot so yo|u can kn|
|000048c0| 6f 77 20 79 6f 75 72 20 | 72 69 67 68 74 73 20 61 |ow your |rights a|
|000048d0| 6e 64 20 72 65 73 70 6f | 6e 73 69 62 69 6c 69 74 |nd respo|nsibilit|
|000048e0| 69 65 73 2e 20 20 49 74 | 0a 20 20 20 73 68 6f 75 |ies. It|. shou|
|000048f0| 6c 64 20 62 65 20 69 6e | 20 61 20 66 69 6c 65 20 |ld be in| a file |
|00004900| 6e 61 6d 65 64 20 43 4f | 50 59 49 4e 47 2e 20 20 |named CO|PYING. |
|00004910| 41 6d 6f 6e 67 20 6f 74 | 68 65 72 20 74 68 69 6e |Among ot|her thin|
|00004920| 67 73 2c 20 74 68 65 20 | 63 6f 70 79 72 69 67 68 |gs, the |copyrigh|
|00004930| 74 0a 20 20 20 6e 6f 74 | 69 63 65 20 61 6e 64 20 |t. not|ice and |
|00004940| 74 68 69 73 20 6e 6f 74 | 69 63 65 20 6d 75 73 74 |this not|ice must|
|00004950| 20 62 65 20 70 72 65 73 | 65 72 76 65 64 20 6f 6e | be pres|erved on|
|00004960| 20 61 6c 6c 20 63 6f 70 | 69 65 73 2e 20 20 2a 2f | all cop|ies. */|
|00004970| 0a 0a 23 69 6e 63 6c 75 | 64 65 20 22 73 79 73 2d |..#inclu|de "sys-|
|00004980| 64 65 66 69 6e 65 73 2e | 68 22 0a 23 69 6e 63 6c |defines.|h".#incl|
|00004990| 75 64 65 20 22 6c 69 62 | 70 6c 6f 74 2e 68 22 0a |ude "lib|plot.h".|
|000049a0| 23 69 6e 63 6c 75 64 65 | 20 22 65 78 74 65 72 6e |#include| "extern|
|000049b0| 2e 68 22 0a 0a 2f 2a 20 | 41 4c 41 42 45 4c 20 74 |.h"../* |ALABEL t|
|000049c0| 61 6b 65 73 20 74 68 72 | 65 65 20 61 72 67 75 6d |akes thr|ee argum|
|000049d0| 65 6e 74 73 20 58 5f 4a | 55 53 54 49 46 59 2c 20 |ents X_J|USTIFY, |
|000049e0| 59 5f 4a 55 53 54 49 46 | 59 2c 20 61 6e 64 20 53 |Y_JUSTIF|Y, and S|
|000049f0| 20 61 6e 64 20 70 6c 61 | 63 65 73 0a 20 20 20 74 | and pla|ces. t|
|00004a00| 68 65 20 6c 61 62 65 6c | 20 53 20 61 63 63 6f 72 |he label| S accor|
|00004a10| 64 69 6e 67 20 74 6f 20 | 74 68 65 20 78 20 61 6e |ding to |the x an|
|00004a20| 64 20 79 20 61 78 69 73 | 20 61 64 6a 75 73 74 6d |d y axis| adjustm|
|00004a30| 65 6e 74 73 20 73 70 65 | 63 69 66 69 65 64 20 69 |ents spe|cified i|
|00004a40| 6e 0a 20 20 20 58 5f 4a | 55 53 54 49 46 59 20 61 |n. X_J|USTIFY a|
|00004a50| 6e 64 20 59 5f 4a 55 53 | 54 49 46 59 20 72 65 73 |nd Y_JUS|TIFY res|
|00004a60| 70 65 63 74 69 76 65 6c | 79 2e 20 20 58 5f 4a 55 |pectivel|y. X_JU|
|00004a70| 53 54 49 46 59 20 69 73 | 20 61 20 63 68 61 72 61 |STIFY is| a chara|
|00004a80| 63 74 65 72 0a 20 20 20 | 63 6f 6e 74 61 69 6e 69 |cter. |containi|
|00004a90| 6e 67 20 65 69 74 68 65 | 72 20 6c 2c 20 63 2c 20 |ng eithe|r l, c, |
|00004aa0| 6f 72 20 72 20 66 6f 72 | 20 6c 65 66 74 2c 20 63 |or r for| left, c|
|00004ab0| 65 6e 74 65 72 20 6f 72 | 20 72 69 67 68 74 20 6a |enter or| right j|
|00004ac0| 75 73 74 69 66 69 65 64 | 20 77 69 74 68 0a 20 20 |ustified| with. |
|00004ad0| 20 72 65 73 70 65 63 74 | 20 74 6f 20 74 68 65 20 | respect| to the |
|00004ae0| 63 75 72 72 65 6e 74 20 | 78 20 63 6f 6f 72 64 69 |current |x coordi|
|00004af0| 6e 61 74 65 2e 20 20 59 | 5f 4a 55 53 54 49 46 59 |nate. Y|_JUSTIFY|
|00004b00| 20 69 73 20 61 20 63 68 | 61 72 61 63 74 65 72 0a | is a ch|aracter.|
|00004b10| 20 20 20 63 6f 6e 74 61 | 69 6e 69 6e 67 20 65 69 | conta|ining ei|
|00004b20| 74 68 65 72 20 62 2c 20 | 63 2c 20 6f 72 20 74 20 |ther b, |c, or t |
|00004b30| 66 6f 72 20 70 6c 61 63 | 69 6e 67 20 74 68 65 20 |for plac|ing the |
|00004b40| 62 6f 74 74 6f 6d 20 63 | 65 6e 74 65 72 20 6f 72 |bottom c|enter or|
|00004b50| 20 74 6f 70 20 6f 66 0a | 20 20 20 74 68 65 20 6c | top of.| the l|
|00004b60| 61 62 65 6c 20 65 76 65 | 6e 20 77 69 74 68 20 74 |abel eve|n with t|
|00004b70| 68 65 20 63 75 72 72 65 | 6e 74 20 79 20 63 6f 6f |he curre|nt y coo|
|00004b80| 72 64 69 6e 61 74 65 2e | 20 53 20 69 73 20 61 20 |rdinate.| S is a |
|00004b90| 73 74 72 69 6e 67 20 63 | 6f 6e 74 61 69 6e 69 6e |string c|ontainin|
|00004ba0| 67 0a 20 20 20 74 68 65 | 20 6c 61 62 65 6c 2e 20 |g. the| label. |
|00004bb0| 54 68 65 20 63 75 72 72 | 65 6e 74 20 70 6f 69 6e |The curr|ent poin|
|00004bc0| 74 20 69 73 20 6d 6f 76 | 65 64 20 74 6f 20 66 6f |t is mov|ed to fo|
|00004bd0| 6c 6c 6f 77 20 74 68 65 | 20 65 6e 64 20 6f 66 20 |llow the| end of |
|00004be0| 74 68 65 20 74 65 78 74 | 2e 20 2a 2f 0a 0a 69 6e |the text|. */..in|
|00004bf0| 74 0a 61 6c 61 62 65 6c | 20 28 78 5f 6a 75 73 74 |t.alabel| (x_just|
|00004c00| 69 66 79 2c 20 79 5f 6a | 75 73 74 69 66 79 2c 20 |ify, y_j|ustify, |
|00004c10| 73 29 0a 20 20 20 20 20 | 69 6e 74 20 78 5f 6a 75 |s). |int x_ju|
|00004c20| 73 74 69 66 79 2c 20 79 | 5f 6a 75 73 74 69 66 79 |stify, y|_justify|
|00004c30| 3b 0a 20 20 20 20 20 63 | 68 61 72 20 2a 73 3b 0a |;. c|har *s;.|
|00004c40| 7b 0a 20 20 69 6e 74 20 | 69 3b 0a 20 20 63 68 61 |{. int |i;. cha|
|00004c50| 72 20 2a 70 3b 0a 20 20 | 69 6e 74 20 78 5f 6a 75 |r *p;. |int x_ju|
|00004c60| 73 74 69 66 69 63 61 74 | 69 6f 6e 20 3d 20 30 3b |stificat|ion = 0;|
|00004c70| 0a 20 20 64 6f 75 62 6c | 65 20 79 5f 6f 66 66 73 |. doubl|e y_offs|
|00004c80| 65 74 20 3d 20 30 2e 3b | 0a 0a 20 20 64 72 61 77 |et = 0.;|.. draw|
|00004c90| 5f 6c 69 6e 65 20 28 29 | 3b 0a 20 20 73 77 69 74 |_line ()|;. swit|
|00004ca0| 63 68 28 20 78 5f 6a 75 | 73 74 69 66 79 29 20 7b |ch( x_ju|stify) {|
|00004cb0| 0a 20 20 20 20 63 61 73 | 65 20 27 6c 27 3a 0a 20 |. cas|e 'l':. |
|00004cc0| 20 20 20 20 78 5f 6a 75 | 73 74 69 66 69 63 61 74 | x_ju|stificat|
|00004cd0| 69 6f 6e 20 3d 20 30 3b | 0a 20 20 20 20 20 62 72 |ion = 0;|. br|
|00004ce0| 65 61 6b 3b 0a 20 20 20 | 20 63 61 73 65 20 27 63 |eak;. | case 'c|
|00004cf0| 27 3a 0a 20 20 20 20 20 | 78 5f 6a 75 73 74 69 66 |':. |x_justif|
|00004d00| 69 63 61 74 69 6f 6e 20 | 3d 20 31 3b 0a 20 20 20 |ication |= 1;. |
|00004d10| 20 20 62 72 65 61 6b 3b | 0a 20 20 20 20 63 61 73 | break;|. cas|
|00004d20| 65 20 27 72 27 3a 0a 20 | 20 20 20 20 78 5f 6a 75 |e 'r':. | x_ju|
|00004d30| 73 74 69 66 69 63 61 74 | 69 6f 6e 20 3d 20 32 3b |stificat|ion = 2;|
|00004d40| 0a 20 20 20 20 20 62 72 | 65 61 6b 3b 0a 20 20 20 |. br|eak;. |
|00004d50| 7d 0a 20 20 73 77 69 74 | 63 68 28 20 79 5f 6a 75 |}. swit|ch( y_ju|
|00004d60| 73 74 69 66 79 29 20 7b | 0a 20 20 20 20 63 61 73 |stify) {|. cas|
|00004d70| 65 20 27 74 27 3a 0a 20 | 20 20 20 20 79 5f 6f 66 |e 't':. | y_of|
|00004d80| 66 73 65 74 20 3d 20 31 | 2e 31 3b 0a 20 20 20 20 |fset = 1|.1;. |
|00004d90| 20 62 72 65 61 6b 3b 0a | 20 20 20 20 63 61 73 65 | break;.| case|
|00004da0| 20 27 63 27 3a 0a 20 20 | 20 20 20 79 5f 6f 66 66 | 'c':. | y_off|
|00004db0| 73 65 74 20 3d 20 30 2e | 35 3b 0a 20 20 20 20 20 |set = 0.|5;. |
|00004dc0| 62 72 65 61 6b 3b 0a 20 | 20 20 20 63 61 73 65 20 |break;. | case |
|00004dd0| 27 62 27 3a 0a 20 20 20 | 20 20 79 5f 6f 66 66 73 |'b':. | y_offs|
|00004de0| 65 74 20 3d 20 30 2e 30 | 3b 0a 20 20 20 20 20 62 |et = 0.0|;. b|
|00004df0| 72 65 61 6b 3b 0a 20 20 | 20 7d 0a 0a 20 20 2f 2a |reak;. | }.. /*|
|00004e00| 20 69 67 6e 6f 72 65 20 | 6c 65 61 64 69 6e 67 20 | ignore |leading |
|00004e10| 77 68 69 74 65 20 73 70 | 61 63 65 20 2a 2f 0a 20 |white sp|ace */. |
|00004e20| 20 70 20 3d 20 73 3b 0a | 20 20 77 68 69 6c 65 20 | p = s;.| while |
|00004e30| 28 69 73 73 70 61 63 65 | 28 2a 70 29 29 0a 20 20 |(isspace|(*p)). |
|00004e40| 20 20 70 2b 2b 3b 0a 0a | 20 20 2f 2a 20 6f 6e 6c | p++;..| /* onl|
|00004e50| 79 20 6f 75 74 70 75 74 | 20 74 68 65 20 73 74 72 |y output| the str|
|00004e60| 69 6e 67 20 69 66 20 69 | 74 20 63 6f 6e 74 61 69 |ing if i|t contai|
|00004e70| 6e 73 20 6e 6f 6e 2d 77 | 68 69 74 65 73 70 61 63 |ns non-w|hitespac|
|00004e80| 65 20 63 68 61 72 61 63 | 74 65 72 73 2e 20 2a 2f |e charac|ters. */|
|00004e90| 0a 20 20 69 66 20 28 73 | 74 72 6c 65 6e 28 70 29 |. if (s|trlen(p)|
|00004ea0| 29 0a 20 20 20 20 70 72 | 69 6e 74 66 28 20 22 25 |). pr|intf( "%|
|00004eb0| 64 20 25 64 20 25 64 20 | 25 64 20 25 64 20 25 64 |d %d %d |%d %d %d|
|00004ec0| 20 25 64 20 25 2e 33 66 | 20 25 64 20 25 64 20 25 | %d %.3f| %d %d %|
|00004ed0| 64 20 25 64 20 25 64 20 | 25 73 5c 31 5c 6e 22 2c |d %d %d |%s\1\n",|
|00004ee0| 0a 09 20 20 20 34 2c 09 | 09 09 2f 2a 20 74 65 78 |.. 4,.|../* tex|
|00004ef0| 74 20 6f 62 6a 65 63 74 | 20 2a 2f 0a 09 20 20 20 |t object| */.. |
|00004f00| 78 5f 6a 75 73 74 69 66 | 69 63 61 74 69 6f 6e 2c |x_justif|ication,|
|00004f10| 09 2f 2a 20 68 6f 72 7a | 6f 6e 74 61 6c 20 6a 75 |./* horz|ontal ju|
|00004f20| 73 74 69 66 69 63 61 74 | 69 6f 6e 20 2a 2f 0a 09 |stificat|ion */..|
|00004f30| 20 20 20 66 6f 6e 74 5f | 69 64 2c 09 09 2f 2a 20 | font_|id,../* |
|00004f40| 66 6f 6e 74 20 2a 2f 0a | 09 20 20 20 28 69 6e 74 |font */.|. (int|
|00004f50| 29 20 66 6f 6e 74 5f 73 | 69 7a 65 2c 09 2f 2a 20 |) font_s|ize,./* |
|00004f60| 70 6f 69 6e 74 20 73 69 | 7a 65 20 2a 2f 0a 09 20 |point si|ze */.. |
|00004f70| 20 20 30 2c 09 09 09 2f | 2a 20 70 65 6e 20 2a 2f | 0,.../|* pen */|
|00004f80| 0a 09 20 20 20 30 2c 09 | 09 09 2f 2a 20 63 6f 6c |.. 0,.|../* col|
|00004f90| 6f 72 20 2a 2f 0a 09 20 | 20 20 30 2c 09 09 09 2f |or */.. | 0,.../|
|00004fa0| 2a 20 64 65 70 74 68 20 | 2a 2f 0a 09 20 20 20 74 |* depth |*/.. t|
|00004fb0| 65 78 74 5f 72 6f 74 61 | 74 69 6f 6e 5f 61 6e 67 |ext_rota|tion_ang|
|00004fc0| 6c 65 2c 09 2f 2a 20 61 | 6e 67 6c 65 20 6f 66 20 |le,./* a|ngle of |
|00004fd0| 72 6f 74 61 74 69 6f 6e | 20 28 66 6c 6f 61 74 29 |rotation| (float)|
|00004fe0| 20 2a 2f 0a 09 20 20 20 | 30 2c 09 09 09 2f 2a 20 | */.. |0,.../* |
|00004ff0| 66 6c 61 67 73 20 2a 2f | 0a 09 20 20 20 38 2c 09 |flags */|.. 8,.|
|00005000| 09 09 2f 2a 20 68 65 69 | 67 68 74 20 28 70 69 78 |../* hei|ght (pix|
|00005010| 65 6c 73 29 20 2a 2f 0a | 09 20 20 20 38 2c 09 09 |els) */.|. 8,..|
|00005020| 09 2f 2a 20 6c 65 6e 67 | 74 68 20 28 70 69 78 65 |./* leng|th (pixe|
|00005030| 6c 73 29 20 2a 2f 0a 09 | 20 20 20 28 69 6e 74 29 |ls) */..| (int)|
|00005040| 20 28 28 6c 61 73 74 5f | 78 20 2d 20 78 5f 69 6e | ((last_|x - x_in|
|00005050| 70 75 74 5f 6d 69 6e 29 | 2f 20 78 5f 73 63 61 6c |put_min)|/ x_scal|
|00005060| 65 20 2b 20 78 5f 6f 75 | 74 70 75 74 5f 6d 69 6e |e + x_ou|tput_min|
|00005070| 29 2c 0a 09 20 20 20 28 | 69 6e 74 29 20 28 28 6c |),.. (|int) ((l|
|00005080| 61 73 74 5f 79 20 2d 20 | 79 5f 69 6e 70 75 74 5f |ast_y - |y_input_|
|00005090| 6d 69 6e 29 2f 20 79 5f | 73 63 61 6c 65 20 2b 20 |min)/ y_|scale + |
|000050a0| 79 5f 6f 75 74 70 75 74 | 5f 6d 69 6e 0a 09 09 20 |y_output|_min... |
|000050b0| 20 2b 20 66 6f 6e 74 5f | 73 69 7a 65 20 2a 20 79 | + font_|size * y|
|000050c0| 5f 6f 66 66 73 65 74 20 | 2a 20 37 32 20 2f 20 38 |_offset |* 72 / 8|
|000050d0| 30 29 2c 0a 09 20 20 20 | 70 29 3b 0a 20 20 72 65 |0),.. |p);. re|
|000050e0| 74 75 72 6e 20 30 3b 0a | 7d 0a 00 00 00 00 00 00 |turn 0;.|}.......|
|000050f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005200| 67 72 61 70 68 69 63 73 | 2d 30 2e 31 37 2f 70 6c |graphics|-0.17/pl|
|00005210| 6f 74 32 66 69 67 2f 66 | 69 6c 6c 2e 63 00 00 00 |ot2fig/f|ill.c...|
|00005220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005260| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 33 37 37 |.... 6|44 . 377|
|00005270| 35 35 20 00 20 20 20 31 | 33 32 20 00 20 20 20 20 |55 . 1|32 . |
|00005280| 20 20 20 33 32 35 33 20 | 20 34 37 36 37 30 36 31 | 3253 | 4767061|
|00005290| 36 33 33 20 20 31 33 33 | 33 35 00 20 30 00 00 00 |633 133|35. 0...|
|000052a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000052f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005300| 00 75 73 74 61 72 20 20 | 00 72 69 63 68 00 00 00 |.ustar |.rich...|
|00005310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005400| 2f 2a 20 70 6c 6f 74 2c | 20 75 6e 69 78 20 70 6c |/* plot,| unix pl|
|00005410| 6f 74 20 66 69 6c 65 20 | 74 6f 20 67 72 61 70 68 |ot file |to graph|
|00005420| 69 63 73 20 64 65 76 69 | 63 65 20 74 72 61 6e 73 |ics devi|ce trans|
|00005430| 6c 61 74 6f 72 73 2e 0a | 20 20 20 43 6f 70 79 72 |lators..| Copyr|
|00005440| 69 67 68 74 20 28 43 29 | 20 31 39 38 39 20 46 72 |ight (C)| 1989 Fr|
|00005450| 65 65 20 53 6f 66 74 77 | 61 72 65 20 46 6f 75 6e |ee Softw|are Foun|
|00005460| 64 61 74 69 6f 6e 2c 20 | 49 6e 63 2e 0a 0a 20 20 |dation, |Inc... |
|00005470| 20 70 6c 6f 74 20 69 73 | 20 64 69 73 74 72 69 62 | plot is| distrib|
|00005480| 75 74 65 64 20 69 6e 20 | 74 68 65 20 68 6f 70 65 |uted in |the hope|
|00005490| 20 74 68 61 74 20 69 74 | 20 77 69 6c 6c 20 62 65 | that it| will be|
|000054a0| 20 75 73 65 66 75 6c 2c | 20 62 75 74 20 57 49 54 | useful,| but WIT|
|000054b0| 48 4f 55 54 0a 20 20 20 | 41 4e 59 20 57 41 52 52 |HOUT. |ANY WARR|
|000054c0| 41 4e 54 59 2e 20 20 4e | 6f 20 61 75 74 68 6f 72 |ANTY. N|o author|
|000054d0| 20 6f 72 20 64 69 73 74 | 72 69 62 75 74 6f 72 20 | or dist|ributor |
|000054e0| 61 63 63 65 70 74 73 20 | 72 65 73 70 6f 6e 73 69 |accepts |responsi|
|000054f0| 62 69 6c 69 74 79 20 74 | 6f 0a 20 20 20 61 6e 79 |bility t|o. any|
|00005500| 6f 6e 65 20 66 6f 72 20 | 74 68 65 20 63 6f 6e 73 |one for |the cons|
|00005510| 65 71 75 65 6e 63 65 73 | 20 6f 66 20 75 73 69 6e |equences| of usin|
|00005520| 67 20 69 74 20 6f 72 20 | 66 6f 72 20 77 68 65 74 |g it or |for whet|
|00005530| 68 65 72 20 69 74 20 73 | 65 72 76 65 73 20 61 6e |her it s|erves an|
|00005540| 79 0a 20 20 20 70 61 72 | 74 69 63 75 6c 61 72 20 |y. par|ticular |
|00005550| 70 75 72 70 6f 73 65 20 | 6f 72 20 77 6f 72 6b 73 |purpose |or works|
|00005560| 20 61 74 20 61 6c 6c 2c | 20 75 6e 6c 65 73 73 20 | at all,| unless |
|00005570| 68 65 20 73 61 79 73 20 | 73 6f 20 69 6e 20 77 72 |he says |so in wr|
|00005580| 69 74 69 6e 67 2e 0a 20 | 20 20 52 65 66 65 72 20 |iting.. | Refer |
|00005590| 74 6f 20 74 68 65 20 47 | 4e 55 20 47 65 6e 65 72 |to the G|NU Gener|
|000055a0| 61 6c 20 50 75 62 6c 69 | 63 20 4c 69 63 65 6e 73 |al Publi|c Licens|
|000055b0| 65 20 66 6f 72 20 66 75 | 6c 6c 20 64 65 74 61 69 |e for fu|ll detai|
|000055c0| 6c 73 2e 0a 20 20 20 0a | 20 20 20 45 76 65 72 79 |ls.. .| Every|
|000055d0| 6f 6e 65 20 69 73 20 67 | 72 61 6e 74 65 64 20 70 |one is g|ranted p|
|000055e0| 65 72 6d 69 73 73 69 6f | 6e 20 74 6f 20 63 6f 70 |ermissio|n to cop|
|000055f0| 79 2c 20 6d 6f 64 69 66 | 79 20 61 6e 64 20 72 65 |y, modif|y and re|
|00005600| 64 69 73 74 72 69 62 75 | 74 65 20 70 6c 6f 74 2c |distribu|te plot,|
|00005610| 0a 20 20 20 62 75 74 20 | 6f 6e 6c 79 20 75 6e 64 |. but |only und|
|00005620| 65 72 20 74 68 65 20 63 | 6f 6e 64 69 74 69 6f 6e |er the c|ondition|
|00005630| 73 20 64 65 73 63 72 69 | 62 65 64 20 69 6e 20 74 |s descri|bed in t|
|00005640| 68 65 20 47 4e 55 20 47 | 65 6e 65 72 61 6c 20 50 |he GNU G|eneral P|
|00005650| 75 62 6c 69 63 0a 20 20 | 20 4c 69 63 65 6e 73 65 |ublic. | License|
|00005660| 2e 20 20 41 20 63 6f 70 | 79 20 6f 66 20 74 68 69 |. A cop|y of thi|
|00005670| 73 20 6c 69 63 65 6e 73 | 65 20 69 73 20 73 75 70 |s licens|e is sup|
|00005680| 70 6f 73 65 64 20 74 6f | 20 68 61 76 65 20 62 65 |posed to| have be|
|00005690| 65 6e 20 67 69 76 65 6e | 20 74 6f 20 79 6f 75 0a |en given| to you.|
|000056a0| 20 20 20 61 6c 6f 6e 67 | 20 77 69 74 68 20 70 6c | along| with pl|
|000056b0| 6f 74 20 73 6f 20 79 6f | 75 20 63 61 6e 20 6b 6e |ot so yo|u can kn|
|000056c0| 6f 77 20 79 6f 75 72 20 | 72 69 67 68 74 73 20 61 |ow your |rights a|
|000056d0| 6e 64 20 72 65 73 70 6f | 6e 73 69 62 69 6c 69 74 |nd respo|nsibilit|
|000056e0| 69 65 73 2e 20 20 49 74 | 0a 20 20 20 73 68 6f 75 |ies. It|. shou|
|000056f0| 6c 64 20 62 65 20 69 6e | 20 61 20 66 69 6c 65 20 |ld be in| a file |
|00005700| 6e 61 6d 65 64 20 43 4f | 50 59 49 4e 47 2e 20 20 |named CO|PYING. |
|00005710| 41 6d 6f 6e 67 20 6f 74 | 68 65 72 20 74 68 69 6e |Among ot|her thin|
|00005720| 67 73 2c 20 74 68 65 20 | 63 6f 70 79 72 69 67 68 |gs, the |copyrigh|
|00005730| 74 0a 20 20 20 6e 6f 74 | 69 63 65 20 61 6e 64 20 |t. not|ice and |
|00005740| 74 68 69 73 20 6e 6f 74 | 69 63 65 20 6d 75 73 74 |this not|ice must|
|00005750| 20 62 65 20 70 72 65 73 | 65 72 76 65 64 20 6f 6e | be pres|erved on|
|00005760| 20 61 6c 6c 20 63 6f 70 | 69 65 73 2e 20 20 2a 2f | all cop|ies. */|
|00005770| 0a 0a 2f 2a 20 54 68 69 | 73 20 66 69 6c 65 20 69 |../* Thi|s file i|
|00005780| 73 20 74 68 65 20 66 69 | 6c 6c 20 72 6f 75 74 69 |s the fi|ll routi|
|00005790| 6e 65 2c 20 77 68 69 63 | 68 20 69 73 20 61 6e 20 |ne, whic|h is an |
|000057a0| 65 78 74 65 6e 73 69 6f | 6e 20 74 6f 20 74 68 65 |extensio|n to the|
|000057b0| 20 70 6c 6f 74 0a 20 20 | 20 6c 69 62 72 61 72 79 | plot. | library|
|000057c0| 2e 20 20 49 74 20 63 68 | 61 6e 67 65 73 20 74 68 |. It ch|anges th|
|000057d0| 65 20 67 72 65 79 20 6c | 65 76 65 6c 20 6f 66 20 |e grey l|evel of |
|000057e0| 74 68 65 20 66 69 6c 6c | 20 70 61 74 74 65 72 6e |the fill| pattern|
|000057f0| 20 66 6f 72 20 61 6c 6c | 20 63 6c 6f 73 65 64 0a | for all| closed.|
|00005800| 20 20 20 70 61 74 68 73 | 20 6f 66 20 74 68 65 20 | paths| of the |
|00005810| 66 6f 6c 6c 6f 77 69 6e | 67 20 64 72 61 77 69 6e |followin|g drawin|
|00005820| 67 20 6f 70 65 72 61 74 | 69 6f 6e 73 2e 20 2a 2f |g operat|ions. */|
|00005830| 0a 0a 23 69 6e 63 6c 75 | 64 65 20 22 73 79 73 2d |..#inclu|de "sys-|
|00005840| 64 65 66 69 6e 65 73 2e | 68 22 0a 23 69 6e 63 6c |defines.|h".#incl|
|00005850| 75 64 65 20 22 6c 69 62 | 70 6c 6f 74 2e 68 22 0a |ude "lib|plot.h".|
|00005860| 23 69 6e 63 6c 75 64 65 | 20 22 65 78 74 65 72 6e |#include| "extern|
|00005870| 2e 68 22 0a 0a 64 6f 75 | 62 6c 65 20 66 69 6c 6c |.h"..dou|ble fill|
|00005880| 5f 6c 65 76 65 6c 20 3d | 20 30 2e 3b 20 2f 2a 20 |_level =| 0.; /* |
|00005890| 64 65 66 61 75 6c 74 2c | 20 6e 6f 20 66 69 6c 6c |default,| no fill|
|000058a0| 20 2a 2f 0a 0a 2f 2a 20 | 46 49 4c 4c 20 73 65 74 | */../* |FILL set|
|000058b0| 73 20 74 68 65 20 69 6e | 74 65 6e 73 69 74 79 20 |s the in|tensity |
|000058c0| 6f 66 20 74 68 65 20 66 | 69 6c 6c 65 72 20 66 6f |of the f|iller fo|
|000058d0| 72 20 63 6c 6f 73 65 64 | 20 70 61 74 68 73 2e 20 |r closed| paths. |
|000058e0| 20 4c 45 56 45 4c 0a 72 | 61 6e 67 65 73 20 66 72 | LEVEL.r|anges fr|
|000058f0| 6f 6d 20 30 20 74 6f 20 | 31 2e 20 41 20 76 61 6c |om 0 to |1. A val|
|00005900| 75 65 20 6f 66 20 30 20 | 66 6f 72 20 4c 45 56 45 |ue of 0 |for LEVE|
|00005910| 4c 20 72 65 70 72 65 73 | 65 6e 74 73 20 62 6c 61 |L repres|ents bla|
|00005920| 63 6b 20 61 6e 64 20 61 | 0a 76 61 6c 75 65 20 6f |ck and a|.value o|
|00005930| 66 20 31 20 69 6e 64 69 | 63 61 74 65 73 20 77 68 |f 1 indi|cates wh|
|00005940| 69 74 65 2e 20 41 20 76 | 61 6c 75 65 20 6f 66 20 |ite. A v|alue of |
|00005950| 2d 31 20 72 65 70 72 65 | 73 65 6e 74 73 20 6e 6f |-1 repre|sents no|
|00005960| 20 66 69 6c 6c 20 2d 0a | 74 72 61 6e 73 70 61 72 | fill -.|transpar|
|00005970| 65 6e 74 2e 20 2a 2f 0a | 0a 69 6e 74 0a 66 69 6c |ent. */.|.int.fil|
|00005980| 6c 20 28 6c 65 76 65 6c | 29 0a 20 20 20 20 20 69 |l (level|). i|
|00005990| 6e 74 20 6c 65 76 65 6c | 3b 0a 7b 0a 20 20 69 66 |nt level|;.{. if|
|000059a0| 20 28 6c 65 76 65 6c 20 | 3c 20 30 2e 29 0a 20 20 | (level |< 0.). |
|000059b0| 20 20 7b 0a 20 20 20 20 | 20 20 66 69 6c 6c 5f 6c | {. | fill_l|
|000059c0| 65 76 65 6c 20 3d 20 30 | 2e 3b 0a 20 20 20 20 7d |evel = 0|.;. }|
|000059d0| 0a 20 20 65 6c 73 65 0a | 20 20 20 20 7b 0a 20 20 |. else.| {. |
|000059e0| 20 20 20 20 66 69 6c 6c | 5f 6c 65 76 65 6c 20 3d | fill|_level =|
|000059f0| 20 34 2e 20 2a 20 28 64 | 6f 75 62 6c 65 29 6c 65 | 4. * (d|ouble)le|
|00005a00| 76 65 6c 20 2b 20 31 2e | 3b 0a 20 20 20 20 20 20 |vel + 1.|;. |
|00005a10| 2f 2a 20 54 68 65 20 76 | 61 6c 75 65 20 6f 66 20 |/* The v|alue of |
|00005a20| 66 69 6c 6c 20 6c 65 76 | 65 6c 20 73 68 6f 75 6c |fill lev|el shoul|
|00005a30| 64 20 62 65 20 62 65 74 | 77 65 65 6e 20 31 20 61 |d be bet|ween 1 a|
|00005a40| 6e 64 20 35 2c 0a 09 20 | 77 68 69 63 68 20 69 73 |nd 5,.. |which is|
|00005a50| 20 65 6e 66 6f 72 63 65 | 64 20 68 65 72 65 2e 20 | enforce|d here. |
|00005a60| 2a 2f 0a 20 20 20 20 20 | 20 69 66 20 28 66 69 6c |*/. | if (fil|
|00005a70| 6c 5f 6c 65 76 65 6c 20 | 3e 20 35 2e 29 0a 09 7b |l_level |> 5.)..{|
|00005a80| 0a 09 20 20 66 69 6c 6c | 5f 6c 65 76 65 6c 20 3d |.. fill|_level =|
|00005a90| 20 35 3b 0a 09 7d 0a 20 | 20 20 20 7d 0a 20 20 72 | 5;..}. | }. r|
|00005aa0| 65 74 75 72 6e 20 30 3b | 0a 7d 0a 00 00 00 00 00 |eturn 0;|.}......|
|00005ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005bb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005bc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005c00| 67 72 61 70 68 69 63 73 | 2d 30 2e 31 37 2f 70 6c |graphics|-0.17/pl|
|00005c10| 6f 74 32 66 69 67 2f 73 | 70 61 63 65 2e 63 00 00 |ot2fig/s|pace.c..|
|00005c20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005c30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005c40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005c50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005c60| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 33 37 37 |.... 6|44 . 377|
|00005c70| 35 35 20 00 20 20 20 31 | 33 32 20 00 20 20 20 20 |55 . 1|32 . |
|00005c80| 20 20 20 34 32 35 37 20 | 20 34 37 36 37 30 36 31 | 4257 | 4767061|
|00005c90| 37 37 33 20 20 31 33 35 | 31 34 00 20 30 00 00 00 |773 135|14. 0...|
|00005ca0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005cb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005cc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005cd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005cf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d00| 00 75 73 74 61 72 20 20 | 00 72 69 63 68 00 00 00 |.ustar |.rich...|
|00005d10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005da0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005db0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005dc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e00| 2f 2a 20 6c 69 62 74 65 | 6b 2c 20 61 20 6c 69 62 |/* libte|k, a lib|
|00005e10| 72 61 72 79 20 6f 66 20 | 66 75 6e 63 74 69 6f 6e |rary of |function|
|00005e20| 73 20 66 6f 72 20 74 65 | 6b 74 72 6f 6e 69 63 73 |s for te|ktronics|
|00005e30| 20 34 30 31 30 20 63 6f | 6d 70 61 74 69 62 6c 65 | 4010 co|mpatible|
|00005e40| 20 64 65 76 69 63 65 73 | 2e 0a 20 20 20 43 6f 70 | devices|.. Cop|
|00005e50| 79 72 69 67 68 74 20 28 | 43 29 20 31 39 38 39 20 |yright (|C) 1989 |
|00005e60| 46 72 65 65 20 53 6f 66 | 74 77 61 72 65 20 46 6f |Free Sof|tware Fo|
|00005e70| 75 6e 64 61 74 69 6f 6e | 2c 20 49 6e 63 2e 0a 0a |undation|, Inc...|
|00005e80| 6c 69 62 74 65 6b 20 69 | 73 20 64 69 73 74 72 69 |libtek i|s distri|
|00005e90| 62 75 74 65 64 20 69 6e | 20 74 68 65 20 68 6f 70 |buted in| the hop|
|00005ea0| 65 20 74 68 61 74 20 69 | 74 20 77 69 6c 6c 20 62 |e that i|t will b|
|00005eb0| 65 20 75 73 65 66 75 6c | 2c 20 62 75 74 20 57 49 |e useful|, but WI|
|00005ec0| 54 48 4f 55 54 20 41 4e | 59 0a 57 41 52 52 41 4e |THOUT AN|Y.WARRAN|
|00005ed0| 54 59 2e 20 20 4e 6f 20 | 61 75 74 68 6f 72 20 6f |TY. No |author o|
|00005ee0| 72 20 64 69 73 74 72 69 | 62 75 74 6f 72 20 61 63 |r distri|butor ac|
|00005ef0| 63 65 70 74 73 20 72 65 | 73 70 6f 6e 73 69 62 69 |cepts re|sponsibi|
|00005f00| 6c 69 74 79 20 74 6f 20 | 61 6e 79 6f 6e 65 20 66 |lity to |anyone f|
|00005f10| 6f 72 20 74 68 65 0a 63 | 6f 6e 73 65 71 75 65 6e |or the.c|onsequen|
|00005f20| 63 65 73 20 6f 66 20 75 | 73 69 6e 67 20 69 74 20 |ces of u|sing it |
|00005f30| 6f 72 20 66 6f 72 20 77 | 68 65 74 68 65 72 20 69 |or for w|hether i|
|00005f40| 74 20 73 65 72 76 65 73 | 20 61 6e 79 20 70 61 72 |t serves| any par|
|00005f50| 74 69 63 75 6c 61 72 20 | 70 75 72 70 6f 73 65 20 |ticular |purpose |
|00005f60| 6f 72 0a 77 6f 72 6b 73 | 20 61 74 20 61 6c 6c 2c |or.works| at all,|
|00005f70| 20 75 6e 6c 65 73 73 20 | 68 65 20 73 61 79 73 20 | unless |he says |
|00005f80| 73 6f 20 69 6e 20 77 72 | 69 74 69 6e 67 2e 20 20 |so in wr|iting. |
|00005f90| 52 65 66 65 72 20 74 6f | 20 74 68 65 20 47 4e 55 |Refer to| the GNU|
|00005fa0| 20 47 65 6e 65 72 61 6c | 20 50 75 62 6c 69 63 0a | General| Public.|
|00005fb0| 4c 69 63 65 6e 73 65 20 | 66 6f 72 20 66 75 6c 6c |License |for full|
|00005fc0| 20 64 65 74 61 69 6c 73 | 2e 0a 0a 45 76 65 72 79 | details|...Every|
|00005fd0| 6f 6e 65 20 69 73 20 67 | 72 61 6e 74 65 64 20 70 |one is g|ranted p|
|00005fe0| 65 72 6d 69 73 73 69 6f | 6e 20 74 6f 20 63 6f 70 |ermissio|n to cop|
|00005ff0| 79 2c 20 6d 6f 64 69 66 | 79 20 61 6e 64 20 72 65 |y, modif|y and re|
|00006000| 64 69 73 74 72 69 62 75 | 74 65 20 6c 69 62 74 65 |distribu|te libte|
|00006010| 6b 2c 20 62 75 74 0a 6f | 6e 6c 79 20 75 6e 64 65 |k, but.o|nly unde|
|00006020| 72 20 74 68 65 20 63 6f | 6e 64 69 74 69 6f 6e 73 |r the co|nditions|
|00006030| 20 64 65 73 63 72 69 62 | 65 64 20 69 6e 20 74 68 | describ|ed in th|
|00006040| 65 20 47 4e 55 20 47 65 | 6e 65 72 61 6c 20 50 75 |e GNU Ge|neral Pu|
|00006050| 62 6c 69 63 20 4c 69 63 | 65 6e 73 65 2e 20 20 41 |blic Lic|ense. A|
|00006060| 20 63 6f 70 79 0a 6f 66 | 20 74 68 69 73 20 6c 69 | copy.of| this li|
|00006070| 63 65 6e 73 65 20 69 73 | 20 73 75 70 70 6f 73 65 |cense is| suppose|
|00006080| 64 20 74 6f 20 68 61 76 | 65 20 62 65 65 6e 20 67 |d to hav|e been g|
|00006090| 69 76 65 6e 20 74 6f 20 | 79 6f 75 20 61 6c 6f 6e |iven to |you alon|
|000060a0| 67 20 77 69 74 68 20 6c | 69 62 74 65 6b 20 73 6f |g with l|ibtek so|
|000060b0| 0a 79 6f 75 20 63 61 6e | 20 6b 6e 6f 77 20 79 6f |.you can| know yo|
|000060c0| 75 72 20 72 69 67 68 74 | 73 20 61 6e 64 20 72 65 |ur right|s and re|
|000060d0| 73 70 6f 6e 73 69 62 69 | 6c 69 74 69 65 73 2e 20 |sponsibi|lities. |
|000060e0| 20 49 74 20 73 68 6f 75 | 6c 64 20 62 65 20 69 6e | It shou|ld be in|
|000060f0| 20 61 20 66 69 6c 65 20 | 6e 61 6d 65 64 0a 43 4f | a file |named.CO|
|00006100| 50 59 49 4e 47 2e 20 20 | 41 6d 6f 6e 67 20 6f 74 |PYING. |Among ot|
|00006110| 68 65 72 20 74 68 69 6e | 67 73 2c 20 74 68 65 20 |her thin|gs, the |
|00006120| 63 6f 70 79 72 69 67 68 | 74 20 6e 6f 74 69 63 65 |copyrigh|t notice|
|00006130| 20 61 6e 64 20 74 68 69 | 73 20 6e 6f 74 69 63 65 | and thi|s notice|
|00006140| 20 6d 75 73 74 20 62 65 | 0a 70 72 65 73 65 72 76 | must be|.preserv|
|00006150| 65 64 20 6f 6e 20 61 6c | 6c 20 63 6f 70 69 65 73 |ed on al|l copies|
|00006160| 2e 20 20 2a 2f 0a 0a 2f | 2a 20 54 68 69 73 20 66 |. */../|* This f|
|00006170| 69 6c 65 20 69 73 20 74 | 68 65 20 73 70 61 63 65 |ile is t|he space|
|00006180| 20 72 6f 75 74 69 6e 65 | 2c 20 77 68 69 63 68 20 | routine|, which |
|00006190| 69 73 20 61 20 73 74 61 | 6e 64 61 72 64 20 70 61 |is a sta|ndard pa|
|000061a0| 72 74 20 6f 66 20 74 68 | 65 20 70 6c 6f 74 0a 20 |rt of th|e plot. |
|000061b0| 20 20 6c 69 62 72 61 72 | 79 2e 20 20 49 74 20 73 | librar|y. It s|
|000061c0| 65 74 73 20 74 68 65 20 | 6c 6f 77 65 72 20 6c 65 |ets the |lower le|
|000061d0| 66 74 20 61 6e 64 20 75 | 70 70 65 72 20 72 69 67 |ft and u|pper rig|
|000061e0| 68 74 20 63 6f 72 6e 65 | 72 73 20 6f 66 20 74 68 |ht corne|rs of th|
|000061f0| 65 20 70 61 67 65 2e 20 | 20 54 68 65 0a 20 20 20 |e page. | The. |
|00006200| 70 6c 6f 74 20 77 69 6c | 6c 20 62 65 20 73 63 61 |plot wil|l be sca|
|00006210| 6c 65 64 20 73 6f 20 74 | 68 61 74 20 74 68 65 73 |led so t|hat thes|
|00006220| 65 20 63 6f 6e 65 72 73 | 20 66 69 74 20 74 68 65 |e coners| fit the|
|00006230| 20 6c 61 72 67 65 73 74 | 20 72 65 6e 64 65 72 61 | largest| rendera|
|00006240| 62 6c 65 20 61 72 65 61 | 20 6f 6e 0a 20 20 20 74 |ble area| on. t|
|00006250| 68 65 20 70 61 67 65 2e | 20 20 2a 2f 0a 0a 23 69 |he page.| */..#i|
|00006260| 6e 63 6c 75 64 65 20 22 | 73 79 73 2d 64 65 66 69 |nclude "|sys-defi|
|00006270| 6e 65 73 2e 68 22 0a 23 | 69 6e 63 6c 75 64 65 20 |nes.h".#|include |
|00006280| 22 6c 69 62 70 6c 6f 74 | 2e 68 22 0a 23 69 6e 63 |"libplot|.h".#inc|
|00006290| 6c 75 64 65 20 22 65 78 | 74 65 72 6e 2e 68 22 0a |lude "ex|tern.h".|
|000062a0| 0a 64 6f 75 62 6c 65 20 | 78 5f 69 6e 70 75 74 5f |.double |x_input_|
|000062b0| 6d 69 6e 20 3d 20 30 2e | 3b 20 20 20 20 2f 2a 20 |min = 0.|; /* |
|000062c0| 6d 69 6e 69 6d 75 6d 20 | 69 6e 70 75 74 20 78 20 |minimum |input x |
|000062d0| 63 6f 6f 72 64 69 6e 61 | 74 65 20 2a 2f 0a 64 6f |coordina|te */.do|
|000062e0| 75 62 6c 65 20 79 5f 69 | 6e 70 75 74 5f 6d 69 6e |uble y_i|nput_min|
|000062f0| 20 3d 20 30 2e 3b 20 20 | 20 20 2f 2a 20 6d 69 6e | = 0.; | /* min|
|00006300| 69 6d 75 6d 20 69 6e 70 | 75 74 20 79 20 63 6f 6f |imum inp|ut y coo|
|00006310| 72 64 69 6e 61 74 65 20 | 2a 2f 0a 2f 2a 20 4c 61 |rdinate |*/./* La|
|00006320| 74 65 78 20 68 61 73 20 | 74 72 6f 75 62 6c 65 73 |tex has |troubles|
|00006330| 20 77 69 74 68 20 70 6c | 6f 74 73 20 6c 61 72 67 | with pl|ots larg|
|00006340| 65 72 20 74 68 61 6e 20 | 36 20 69 6e 63 68 65 73 |er than |6 inches|
|00006350| 20 28 34 38 30 29 2e 20 | 2a 2f 0a 2f 2a 20 54 68 | (480). |*/./* Th|
|00006360| 65 20 72 61 6e 67 65 20 | 28 36 30 2c 36 36 30 29 |e range |(60,660)|
|00006370| 20 74 6f 20 28 35 34 30 | 2c 31 38 30 29 20 63 65 | to (540|,180) ce|
|00006380| 6e 74 65 72 73 20 74 68 | 65 20 70 6c 6f 74 20 69 |nters th|e plot i|
|00006390| 6e 20 74 68 65 20 66 69 | 67 20 77 69 6e 64 6f 77 |n the fi|g window|
|000063a0| 2e 20 2a 2f 0a 64 6f 75 | 62 6c 65 20 78 5f 6f 75 |. */.dou|ble x_ou|
|000063b0| 74 70 75 74 5f 6d 69 6e | 20 3d 20 36 30 2e 3b 20 |tput_min| = 60.; |
|000063c0| 20 20 2f 2a 20 6d 69 6e | 69 6d 75 6d 20 6f 75 74 | /* min|imum out|
|000063d0| 70 75 74 20 78 20 63 6f | 6f 72 64 69 6e 61 74 65 |put x co|ordinate|
|000063e0| 20 2a 2f 0a 64 6f 75 62 | 6c 65 20 79 5f 6f 75 74 | */.doub|le y_out|
|000063f0| 70 75 74 5f 6d 69 6e 20 | 3d 20 36 36 30 2e 3b 20 |put_min |= 660.; |
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.